Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
decode path info #177
Decode path info
decode path info
changed the title from
Jul 15, 2014
added a commit
this pull request
Jul 19, 2014
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Is the CGI encoding used here the same as the percent encoding defined in the spec? I couldn't find anything conclusive, but I believe these are slightly different encodings. The addressable gem provides a
That's a good point @samwgoldman
URI.decode("%20+") => " +" CGI::unescape("%20+") => " " URI.encode("+") => "+"
According to http://en.wikipedia.org/wiki/Percent-encoding, the "+" representation of a space is part of the application/x-www-form-urlencoded spec, and therefore is only relevant to the query string party of a URL.
Sorry @bethesque, I was slightly off. It's
I've tried to work out what the exact difference is between
I guess the question is, is it worth including an extra dependency (or copying the