diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-06 01:41:10 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-06 01:41:10 +0000 |
commit | 68b18291acc84bc4068e531d3085bfda8a5419de (patch) | |
tree | c6a0545858488d00eeafafda273c97e08982746a | |
parent | 41bfc7a7218d34b9b9ffbe8154a728b2e044211f (diff) | |
download | ruby-68b18291acc84bc4068e531d3085bfda8a5419de.tar.gz |
* lib/uri/common.rb (URI::Parser#initialize_pattern):
refix for restrict the pattern.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/uri/common.rb | 2 | ||||
-rw-r--r-- | test/uri/test_ldap.rb | 2 |
3 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Mon Dec 6 10:39:54 2010 NARUSE, Yui <naruse@ruby-lang.org> + + * lib/uri/common.rb (URI::Parser#initialize_pattern): + refix for restrict the pattern. + Mon Dec 6 09:45:11 2010 Eric Hodel <drbrain@segment7.net> * ext/openssl (OpenSSL): add toplevel documentation diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 0ffd6ddcc4..e2ccbdc846 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -260,7 +260,7 @@ module URI # hostname = *( domainlabel "." ) toplabel [ "." ] # reg-name = *( unreserved / pct-encoded / sub-delims ) # RFC3986 unless hostname - ret[:HOSTNAME] = hostname = "(?:[a-zA-Z0-9\\-._~!$&'()*+,;=]|%\\h\\h)*" + ret[:HOSTNAME] = hostname = "(?:[a-zA-Z0-9\\-.]|%\\h\\h)+" end # RFC 2373, APPENDIX B: diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb index c96a067804..a4cdbff275 100644 --- a/test/uri/test_ldap.rb +++ b/test/uri/test_ldap.rb @@ -36,7 +36,7 @@ class TestLDAP < Test::Unit::TestCase assert_equal(nil, u.extensions) # from RFC2255, section 6. - urls = { + { 'ldap:///o=University%20of%20Michigan,c=US' => ['ldap', nil, URI::LDAP::DEFAULT_PORT, 'o=University%20of%20Michigan,c=US', |