On Tue, Apr 24, 2012 at 4:51 PM, Matt Patenaude <[email protected]>wrote:
> If Node automatically performed a URL decode on the pathname, you lose > data — e.g., if your application depended on knowing whether someone > encoded a space as a "+" or %20 (it seems silly, but let's say you can > contrive an example where that matters), you'd have no way to tell from > that information. URL parsing and decoding are conceptually separate steps, > and the implementation in Node reflects that. > But the encoding would still be present in the "path" part. Just decoded in "pathname". I get the "don't throw away data" part. And I'm also not suggesting fixing this - because I'm sure it would break a bunch of things. Just curious why it was done that way? FWIW I was testing this because Ruby's Sinatra treats %3F in the URL as the end of the path and start of the querystring. How ridiculous is that? I wanted to make sure Node (express) didn't have the same bug. Matt. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
