flapjack / flapjack-diner

Consumer of the Flapjack API
http://flapjack.io/
MIT License
17 stars 10 forks source link

percent-encode spaces in URL paths #29

Closed ghost closed 10 years ago

ghost commented 10 years ago

Fixes #28.

The RFC says that commas are reserved characters too (and should thus be escaped), but URI.escape doesn't do that. Leaving for now as it's not causing problems in Flapjack.

auxesis commented 10 years ago

Looks good.

The CGI and URI modules in Ruby are dark, confusing places.

Merge away.

jessereynolds commented 10 years ago

It's unfortunate about the : needing to be URI escaped but otherwise all good, :+1:

ghost commented 10 years ago

Yeah, webmock will work with encoded or non-encoded strings (and is more liberal than sinatra in that respect) but I wanted to change the expectations to match the exact encodings we want to send.

jessereynolds commented 10 years ago

If we don't have a specific need to encode colons in the uris I'd rather not do it for readability of web server logs, intercepting traffic etc.

ghost commented 10 years ago

They won't be encoded in the paths, so maybe I should change the tests back :frowning: They will be encoded in parameters though (e.g. ISO8601 time strings).