1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

make case insensitive for host-part.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akira 2003-12-09 11:07:36 +00:00
parent 1c09059ed8
commit 8edab1a9b4
3 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,11 @@
Tue Dec 9 19:53:02 2003 akira yamada <akira@ruby-lang.org>
* lib/uri/generic.rb (URI::Generic#route_from0): make case insensitive
for host-part.
* test/uri/test_generic.rb (test_route): added tests for the above
change.
Tue Dec 9 14:10:48 2003 Tanaka Akira <akr@m17n.org>
* io.c (rb_io_check_readable): don't call io_seek if EOF flag is set,

View file

@ -947,7 +947,7 @@ Object
self.query, self.fragment)
if rel.userinfo != oth.userinfo ||
rel.host != oth.host ||
rel.host.downcase != oth.host.downcase ||
rel.port != oth.port
rel.set_port(nil) if rel.port == oth.default_port
return rel, rel

View file

@ -171,6 +171,12 @@ class TestGeneric < Test::Unit::TestCase
url = URI.parse('http://hoge/a/b/').route_to('http://hoge/b/')
assert_equal('../../b/', url.to_s)
url = URI.parse('http://hoge/a/b/').route_to('http://HOGE/b/')
assert_equal('../../b/', url.to_s)
url = URI.parse('http://hoge/a/b/').route_to('http://MOGE/b/')
assert_equal('//MOGE/b/', url.to_s)
end
def test_rfc2396_examples