зеркало из https://github.com/github/ruby.git
* lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^
on both rfc2396 and rfc3986. [Bug #10619] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
132415bf9e
Коммит
30fef86b38
|
@ -1,3 +1,8 @@
|
|||
Tue Dec 23 22:04:38 2014 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/uri/generic.rb (URI::Generic#query=): don't escape [\]^
|
||||
on both rfc2396 and rfc3986. [Bug #10619]
|
||||
|
||||
Tue Dec 23 16:03:35 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/win32/lib/win32/registry.rb (Win32::Registry::Error#initialize):
|
||||
|
|
|
@ -851,7 +851,7 @@ module URI
|
|||
v.encode!(Encoding::UTF_8) rescue nil
|
||||
v.delete!("\t\r\n")
|
||||
v.force_encoding(Encoding::ASCII_8BIT)
|
||||
v.gsub!(/(?!%\h\h|[!$-&(-;=?-Z_a-~])./n.freeze){'%%%02X'.freeze % $&.ord}
|
||||
v.gsub!(/(?!%\h\h|[!$-&(-;=?-_a-~])./n.freeze){'%%%02X'.freeze % $&.ord}
|
||||
v.force_encoding(Encoding::US_ASCII)
|
||||
@query = v
|
||||
end
|
||||
|
|
|
@ -714,9 +714,9 @@ class URI::TestGeneric < Test::Unit::TestCase
|
|||
assert_equal('b123', uri.fragment = 'b123')
|
||||
assert_equal('http://foo:bar@zab:8080/?a=1#b123', uri.to_s)
|
||||
assert_equal('a[]=1', uri.query = 'a[]=1')
|
||||
assert_equal('http://foo:bar@zab:8080/?a%5B%5D=1#b123', uri.to_s)
|
||||
assert_equal('http://foo:bar@zab:8080/?a[]=1#b123', uri.to_s)
|
||||
uri = URI.parse('http://foo:bar@zab:8080/?a[]=1#b123')
|
||||
assert_equal('http://foo:bar@zab:8080/?a%5B%5D=1#b123', uri.to_s)
|
||||
assert_equal('http://foo:bar@zab:8080/?a[]=1#b123', uri.to_s)
|
||||
|
||||
uri = URI.parse('http://example.com')
|
||||
assert_raise(URI::InvalidURIError) { uri.password = 'bar' }
|
||||
|
|
Загрузка…
Ссылка в новой задаче