summaryrefslogtreecommitdiff
path: root/test/uri
AgeCommit message (Collapse)Author
2015-01-14* lib/uri/mailto.rb: raising URI::InvalidComponentError insteadduerst
of failing with undefined method `split' for nil:NilClass for mailto: URIs without opaque part. [Bug #10738] * test/uri/testuri.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-23* lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^naruse
on both rfc2396 and rfc3986. [Bug #10619] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01* lib/uri/generic.rb (URI::Generic.build):naruse
use hostname= to detect and wrap IPv6 hosts. Build is accepting URI components and users may not expect that a host component needs to be wrapped with square brackets since it's not providing a URI. Note: initialize with arg_check => true does not wrap IPv6 hosts. by Joe Rafaniello <jrafanie@redhat.com> https://github.com/ruby/ruby/pull/765 fix GH-765 * test/uri/test_generic.rb: Add more tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-03* lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):naruse
allow '[' and ']' for URI input (and escape). [Bug #10402] * lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-27* lib/uri/rfc3986_parser.rb: raise URI::InvalidURIError whenglass
uri doesn't respond to #to_str. [ruby-core:64453] [Bug #10150] * test/uri/test_parser.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17* lib/uri/rfc3986_parser.rb: specify a regexp for :OPAQUE; generic.rbnaruse
assumes it is present, and will refuse all values otherwise. by Matthew Draper <matthew@trebex.net> https://github.com/ruby/ruby/pull/718 fix GH-718 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-25uri/common.rb: use negative look-aheadnobu
* lib/uri/common.rb (URI.decode_www_form_component): use negative look-ahead instead of nested repeat operators, to get rid of backtrack explosion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-03* lib/uri/generic.rb (URI::Generic#query=): remove validation, justnaruse
escape. [Feature #2542] * lib/uri/generic.rb (URI::Generic#fragment=): ditto. * lib/uri/generic.rb (URI::Generic#check_query): removed. * lib/uri/generic.rb (URI::Generic#set_query): ditto. * lib/uri/generic.rb (URI::Generic#check_fragment): ditto. * lib/uri/generic.rb (URI::Generic#set_fragment): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27* lib/uri/mailto.rb: update to latest specs, RFC 6068 and HTML5.naruse
* lib/uri/mailto.rb (HEADER_PATTERN): removed. * lib/uri/mailto.rb (HEADER_REGEXP): use RFC 6068 hfields. * lib/uri/mailto.rb (EMAIL_REGEXP): use HTML5 email regexp. * lib/uri/mailto.rb (URI::MailTo.build): support multiple to addresses. * lib/uri/mailto.rb (URI::MailTo#initialize): Support multiple to addresses. Don't check with regexp, only split. * lib/uri/mailto.rb (URI::MailTo#check_to): verify by matching URI path-rootless and HTML5 email regexp with unescaped one. * lib/uri/mailto.rb (URI::MailTo#check_headers): verify only by HEADER_REGEXP. * lib/uri/mailto.rb (URI::MailTo#set_headers): don't check by HEADER_REGEXP, only split it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-27suppress warnings: URI.regexp is obsoletenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-24Revert "* lib/uri/mailto.rb: support RFC6068."naruse
to fix mailto URI syntax git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23* test/uri/test_common.rb: use `require_relative` for parallel test.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23* lib/uri/mailto.rb: support RFC6068.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23* lib/uri/generic.rb (check_port): allow strings for port= asnaruse
described in rdoc. * lib/uri/rfc3986_parser.rb (regexp): implementation detail of above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-23suppress warnings of URI.extractnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-22support RFC3986 [Feature #2542]naruse
* lib/uri/common.rb (URI::REGEXP): move to lib/uri/rfc2396_parser.rb. * lib/uri/common.rb (URI::Parser): ditto. * lib/uri/common.rb (URI.split): use RFC3986_Parser. * lib/uri/common.rb (URI.parse): ditto. * lib/uri/common.rb (URI.join): ditto. * lib/uri/common.rb (URI.extract): deprecated. * lib/uri/common.rb (URI.regexp): ditto. * lib/uri/rfc2396_parser.rb: added. * lib/uri/rfc3986_parser.rb: added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-16* test/uri/test_generic.rb: fix wrong arguments for test case.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-21* test/uri/test_generic.rb (URI#test_merge): Test uri + URI(path)knu
in addition to uri + path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-13* lib/uri/generic.rb (URI::Generic.find_proxy): return nil ifnaruse
http_proxy environment variable is empty string. [ruby-core:57140] [Bug #8898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-31* lib/uri/common.rb (URI.decode_www_form_component):sorah
Don't raise error when str includes multibyte characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-24* lib/uri/generic.rb (find_proxy): raise BadURIError if the URI isnaruse
a relative URI. [Bug #8645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-18* lib/uri/common.rb (URI.decode_www_form): scrub string if decodednaruse
bytes are invalid for the encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-25* lib/uri/common.rb (URI.decode_www_form): follow current URL Standard.naruse
It gets encoding argument to specify the character encoding. It now allows loose percent encoded strings, but denies ;-separator. [ruby-core:53475] [Bug #8103] * lib/uri/common.rb (URI.decode_www_form): follow current URL Standard. It gets encoding argument to convert before percent encode. Now UTF-16 strings aren't converted to UTF-8 before percent encode by default. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-30* lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"naruse
is not present [ruby-core:47344] [Bug #6945] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-22* test/uri/test_generic.rb (URI#test_find_proxy): add tests with empty ↵kazu
*_proxy env variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-22fix failureskazu
* test/uri/test_generic.rb (URI#with_env): unset proxy related env variables. [Bug #6774] * test/uri/test_generic.rb (URI#test_find_proxy): fix failures when proxy related env variables already set. [Bug #6774] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-20* lib/net/http.rb: Net::HTTP now automatically detects and usesdrbrain
proxies from the environment. A proxy may also be specified as before. Net::HTTP::Proxy still creates anonymous classes, but these classes are only used to store configuration information. When an HTTP instance is created the configuration is now copied. Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP [Feature #6546] * lib/open-uri.rb: Moved URI::Generic#find_proxy to uri/generic. * lib/uri/generic.rb: Imported find_proxy from open-uri. * test/open-uri/test_open-uri.rb: Moved proxy-discovery tests to URI. * test/uri/test_generic.rb: Imported proxy-discovery tests from open-uri. * test/net/http/test_http.rb: Added tests for proxy behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* lib/uri/generic.rb (URI::Generic.build): duplicate args before addingnaruse
new items. (don't change arguments) * lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT if this method is called from URI::Generic. * lib/uri/generic.rb (URI::Generic.build2): escape only if the item is a String. * lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because it doesn't have parser method. [Bug #6420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11* lib/uri/generic.rb (module URI): URI now downcases the scheme todrbrain
follow RFC 2396 section 3.1. [ruby-trunk - Feature #4551] * test/uri/test_generic.rb (class URI): Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-23* lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change ofnaruse
Ruby 1.9; use Array#join. [Bug #5840] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-05* lib/uri/common.rb (URI::Parser#initialize_regexp):naruse
use \A \z instead of ^ $. [Bug #5843] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03* lib/net/http.rb (URI::HTTP#request_uri): return nil when the urinaruse
is path-rootless form. Bug #4759 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-15Add some more tests for the previous fix.knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-15* lib/uri/generic.rb (#route_from_path): Fix a bug whereknu
URI('http://h/b/').route_to('http://h/b') wrongly returned './' (should be '../b'). [Bug #4476] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06* test/uri/test_common.rb (TestCommon#test_encode_www_form): addkazu
tests for r30015. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-06* lib/uri/common.rb (URI::Parser#initialize_pattern):naruse
refix for restrict the pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-29* lib/uri/common.rb (URI::WFKV_): get rid of backtrack explosionnobu
by nested repeat operators. [ruby-core:33464] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-06* lib/uri/generic.rb (URI::Generic#hostname): new method.akr
(URI::Generic#hostname=): ditto. * lib/open-uri.rb: use URI#hostname * lib/net/http.rb: ditto. [ruby-core:32056] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-30* lib/uri/common.rb (URI.encode_www_form): change treatment ofnaruse
undefined value in given array as latest internet draft for application/www-form-urlencoded. http://tools.ietf.org/html/draft-hoehrmann-urlencoded-01 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-10* lib/uri/common.rb (decode_www_form_component): validate.naruse
[ruby-dev:40938] * lib/uri/common.rb (decode_www_form): allow empty string. * lib/uri/common.rb: fix nodoc for constant. [ruby-dev:40949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* lib/uri/common.rb (decode_www_form): don't ignore leading '?'.naruse
[ruby-dev:40938] * lib/uri/common.rb (decode_www_form): check whether argument is valid application/x-www-form-urlencoded data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* lib/uri/common.rb (URI.encode_www_form_component):naruse
convert strings of HTML5 ASCII incompatible encoding to UTF-8. * lib/uri/common.rb (URI.encode_www_form_component): "\x83\x41" of Shift_JIS should be encoded as "%83A". This follows real implementations. * lib/uri/common.rb (URI.decode_www_form_component): use given encoding for force_encoding. [ruby-dev:40721] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-17* lib/uri/common.rb (URI#{en,de}code_www_form_component):naruse
renamed from URI#{en,de}code_www_component. [ruby-dev:40672] * lib/uri/common.rb (URI#encode_www_form_component): %-encoded element should have always two hex. * lib/uri/common.rb (URI#encode_www_form_component): better treatment for ASCII incompatible encodings and encodings whose lead byte may use 7bit. * lib/uri/common.rb (URI#decode_www_form_component): add %20. * lib/uri/common.rb (URI#decode_www_form_component): add result's encoding as 2nd argument. * lib/uri/common.rb (URI#decode_www_form): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-12* lib/uri/common.rb (URI.encode_www_form): new method tonaruse
generate URL-encoded form data. [ruby-dev:39246] * lib/uri/common.rb (URI.encode_www_component, URI.decode_www_component): new method for encode/decode a name/value of HTML form. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25supress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24* test: assert_raises has been deprecated since a long time ago.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-10 * lib/uri/common.rb (URI::Parser): new class.akira
* lib/uri/mailto.rb, lib/uri/generic.rb: follow the above change. * test/uri/test_parser.rb: added tests for URI::Parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-18use ML ref. for assertion message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e