defunkt / hurl

Hurl makes HTTP requests.
http://hurl.it
MIT License
529 stars 77 forks source link

basic auth breaks due to ruby's base64 implementation #25

Closed progrium closed 14 years ago

progrium commented 14 years ago

Ruby's Base64 library puts a newline not only at the end, but every 60 characters. This breaks HTTP headers (at least for servers that don't require \r), as well as the output in hurl's ui (changes from class 's' to 'nf' after 60 characters).

I intend to submit a patch that strips newlines from the Base64 string before putting it in headers.

progrium commented 14 years ago

http://github.com/progrium/hurl/commit/7f391411f1b41f0d17f31b879b074344dca79053

progrium commented 14 years ago

It's likely this wasn't caught before because most user/pass combos are relatively short. I was dealing with one about 70 chars long before encoding.

defunkt commented 14 years ago

Merged, thanks!