aboutsummaryrefslogtreecommitdiffstats
path: root/lib/uri
Commit message (Collapse)AuthorAgeFilesLines
...
* * lib/uri/ftp.rb (URI::FTP#set_path): added to correct handling ofmame2010-04-152-2/+10
| | | | | | | | | | | | | special case where path of ftp is relative. This converts relative path to absolute one, because external representation of ftp path is relative and internal representation is absolute. [ruby-core:24077] * lib/uri/ftp.rb (URI::FTP#initialize): converts absolute to relative. * lib/uri/generic.rb (URI::Generic#check_path): allow relative path when scheme is ftp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (decode_www_form_component): validate.naruse2010-04-101-11/+7
| | | | | | | | | | [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
* * lib/uri/common.rb (decode_www_form): don't ignore leading '?'.naruse2010-04-091-3/+6
| | | | | | | | | [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
* Add description about de facto FTP URI spec.naruse2010-04-091-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI.encode_www_form_component):naruse2010-03-211-26/+15
| | | | | | | | | | | | | | 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
* * lib/uri/common.rb (URI#{en,de}code_www_form_component):naruse2010-03-171-26/+68
| | | | | | | | | | | | | | | | | | | | 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
* * lib/uri/common.rb (URI.encode_www_component):naruse2010-03-151-2/+4
| | | | | | call str.to_s at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI.encode_www_form): new method tonaruse2010-03-121-0/+86
| | | | | | | | | | 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
* * lib/uri/common.rb (initialize_regexp): allow leadingnaruse2010-01-011-2/+2
| | | | | | | | | and trailing white space, and forbid extra characters on another lines. [ruby-core:26223] RFC 3986 Appendix C. Delimiting a URI in Context draft-duerst-iri-bis-07 7.2. Web Address processing git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI#normalize!): normalize case ofnaruse2010-01-011-0/+3
| | | | | | scheme. [ruby-core:27309] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (eql?): Check the class of the compared object.marcandre2009-12-241-0/+1
| | | | | | Based on a patch by Peter McLain [ruby-core:27019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI.escape): obsoleted.naruse2009-09-061-0/+2
| | | | | | * lib/uri/common.rb (URI,unescape): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri: don't set @parser if it is DEFAULT_PARSER for marshalingakr2009-05-272-30/+37
| | | | | | | | | URI objects between Ruby 1.8 and Ruby 1.9. [ruby-dev:38377] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-066-109/+109
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI::Parser#escape): escaped string is asciinobu2009-03-021-2/+2
| | | | | | | | | | only. * lib/uri/common.rb (URI::Parser#unescape): converts bytewise. [ruby-dev:38005], [ruby-dev:38110] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic#check_path): REL_PATH should amatz2008-11-111-1/+1
| | | | | | symbol. [ruby-core:19805] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix ruby -w warnings for mismatched indentation discovered by rdocdrbrain2008-09-232-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (unescape): skip '%' to make String#hex workmame2008-09-181-1/+1
| | | | | | | correctly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI::Parser): new class.akira2008-09-103-234/+356
| | | | | | | | | | * 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
* * lib/uri/generic.rb: revert r15442. 2nd argument of String#sub parsenaruse2008-02-131-1/+1
| | | | | | | | | escapes. [ruby-dev:33726] * bootstraptest/test_method.rb enc/depend instruby.rb lib/mkmf.rb mkconfig.rb: revert r15443. ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/json/lib/json/pure/generator.rb,naruse2008-02-122-2/+3
| | | | | | | | | | | | | | | ext/json/lib/json/pure/parser.rb, ext/openssl/lib/openssl/x509.rb, ext/win32ole/sample/olegen.rb, lib/date/format.rb, lib/irb/context.rb, lib/irb/workspace.rb, lib/net/http.rb, lib/net/imap.rb, lib/rdoc/generator.rb, lib/rdoc/markup/to_html.rb, lib/rdoc/markup/to_latex.rb, lib/rdoc/parsers/parse_c.rb, lib/rdoc/ri/formatter.rb, lib/rexml/parsers/baseparser.rb, lib/rexml/quickpath.rb, lib/rexml/text.rb, lib/rss/parser.rb, lib/uri/common.rb, lib/uri/generic.rb, lib/webrick/httpresponse.rb, lib/webrick/httpservlet/filehandler.rb, lib/yaml/baseemitter.rb, lib/yaml/encoding.rb: performance tuning arround String#gsub. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s insteadnobu2008-01-241-1/+2
| | | | | | | object_id with printf. [ruby-dev:33347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix Regexp warnings in lib/uri. Patch #16524 by Kornelius Kalnbach.drbrain2007-12-242-19/+18
| | | | | | | [ruby-core:14302] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI::REGEXP::PATTERN): typo in REG_NAMEmatz2007-12-101-1/+1
| | | | | | | regular expression. a patch from Ueda Satoshi <s-ueda AT livedoor.jp>. [ruby-dev:32514] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri.rb, lib/uri/ldaps.rb: added LDAPSakira2007-10-251-0/+12
| | | | | | | cheme. [ruby-dev:31896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * generic.rb (URI::Generic::merge_path): behave as RFC 3986.nobu2007-08-011-52/+52
| | | | | | | [ruby-talk:252052] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::userinfo): Considering howknu2007-02-151-6/+6
| | | | | | | | | `scheme://user:@...', `scheme://:password@...' and `scheme://:@...' are parsed, an empty user name or password should be allowed and represented as it is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::userinfo): should supportmatz2007-02-131-2/+4
| | | | | | | | | empty password. [ruby-core:10290] * lib/uri/generic.rb (URI::Generic::set_password): password can be cleared by nil. [ruby-core:10290] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (escape): regard second argument as a character set. ↵aamine2005-11-131-1/+5
| | | | | | [ruby-dev:27692] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added .document file for lib/uri.ryan2005-09-071-0/+7
| | | | | | | | Added mathew's patches to test_ftp.rb Fixed a minor typo in getoptlong.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Lovely RDOC patches from mathew (metaATpoboxDOTcom) on URI/* and getoptlong.rbryan2005-08-245-34/+151
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb, lib/uri/generic.rb: fixed typo in documents andakira2005-06-242-19/+19
| | | | | | | replaced some existent domain name with "example.com". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed typo in the example of URI.extract.akira2005-06-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (split_userinfo): should split ":pass" into ""akira2005-02-231-8/+1
| | | | | | | and "pass". [ruby-dev:25667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (PORT): typo fix. fiex: [ruby-core:04256]eban2005-01-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/ldap.rb: method hierarchical? should be in URI::LDAP.akira2004-07-172-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic#merge_path):akira2004-07-131-6/+10
| | | | | | | | | | | | "URI('http://www.example.com/foo/..') + './'" should return "URI('http://www.example.com/')". [ruby-list:39838] "URI('http://www.example.com/') + './foo/bar/..'" should return "URI('http://www.example.com/foo/')". [ruby-list:39844] * test/uri/test_generic.rb (TestGeneric#test_merge): added tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (Kernel#URI): new global method for parsing URIs.akr2004-07-051-0/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::merge,akira2004-06-091-19/+31
| | | | | | | | | | | URI::Generic::route_from): accepts non-hierarchical URI. [ruby-dev:23631] * test/uri/test_generic.rb (TestGeneric::test_route, TestGeneric::test_merge): added tests for above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri.rb: Documented (thanks Dmitry V. Sabanin).gsinclair2004-03-247-960/+957
| | | | | | | | | | | | | * lib/uri/common.rb: Ditto. * lib/uri/ftp.rb: Ditto. * lib/uri/generic.rb: Ditto. * lib/uri/http.rb: Ditto. * lib/uri/https.rb: Ditto. * lib/uri/ldap.rb: Ditto. * lib/uri/mailto.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb (URI::REGEXP::PATTERN::HOSTPORT): (?:#{PORT})akira2004-03-081-1/+1
| | | | | | | -> (?::#{PORT}). [ruby-dev:23170] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/mailto.rb (URI::MailTo::to_s): should include fragment.akira2004-02-221-0/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::check_userinfo,akira2003-12-231-9/+12
| | | | | | | | | | | URI::Generic::check_user, URI::Generic::check_password): tests conflicts/depends with other components closely. * test/uri/test_generic.rb (TestGeneric::test_set_component): added tets. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic::check_opaque): fixed typo.akira2003-12-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/generic.rb (URI::Generic#route_from): accepts urls whichakira2003-12-221-1/+1
| | | | | | | | | has no host-part. * test/uri/test_generic.rb (TestGeneric::test_route): added a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make case insensitive for host-part.akira2003-12-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb: new method URI.regexp. [ruby-dev:22121]aamine2003-12-081-17/+35
| | | | | | | * test/uri/test_common.rb: add test for URI.regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/ftp.rb, lib/uri/mailto.rb: renamed to #to_s from #to_str.akira2003-10-042-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,akr2003-03-291-4/+4
| | | | | | | | | lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb, lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert escape for `-' in character class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/common.rb: `[', `]', `-' in chracterakr2003-03-221-1/+1
| | | | | | | class in regexp to avoid warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e