Actions
Bug #10147
closedURI parsing with ruby 2.2.0dev
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-08-18 trunk 47214) [x86_64-darwin13]
Backport:
Description
Hi,
the following uris can't be parsed any more (ruby: ruby 2.2.0dev (2014-08-18 trunk 47214) [x86_64-darwin13])
`
require 'uri'
URI('//example.org/nested_optional_group?items[][key]=foo')
URI('//example.org/nested_optional_group?items[key]=foo')
URI('//example.org/nested_optional_group?items[]=foo')
`
With ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin12.0] this uris can be parsed.
regards
dieter
Updated by ahmadsherif (Ahmad Sherif) over 9 years ago
URI module is now using an RFC3986 parser by default (starting r46491), '[' and ']' characters are not allowed in a URI's query per the RFC.
You can still use the old parser (RFC2396) like this
require 'uri'
p = URI::Parser.new
p.parse('//example.org/nested_optional_group?items[][key]=foo')
or you can have a look at this https://gist.github.com/lengarvey/31983eac6664351ed16d
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0