Actions
Bug #8330
closedWEBrick::HTTPUtils::parse_query replaces plus (+) with space
Description
According to RFC1738, the plus character (+) is a reserved character and may be used unencoded within a URL. Webrick however replaces plus signs with spaces, which violates the spec and causes a loss of information. An encoded plus character (%2B) is correctly decoded by Webrick.
This bug affects Ruby 1.8, 1.9 and 2.0.
$ irb
irb(main):001:0> require "webrick"
=> true
irb(main):002:0> WEBrick::HTTPUtils::parse_query("a+b c")
=> {"a b c"=>""}
irb(main):003:0> WEBrick::HTTPUtils::parse_query("a%2Bb%20c")
=> {"a+b c"=>""}
irb(main):004:0> ^D
Actions
Like0
Like0Like0Like0