drbrain / net-http-persistent

Thread-safe persistent connections with Net::HTTP
http://seattlerb.rubyforge.org/net-http-persistent
339 stars 117 forks source link

Reading of auth credentials from proxy URI is broken #48

Closed mislav closed 10 years ago

mislav commented 11 years ago

When auth credentials are embedded in a proxy URI string, such as:

http://user%40example.com:my%20password@example.com

reading user and password properties are going to return escaped values:

uri.user #=> "user%40example.com"

and you have to additionally unescape them to get real values. Ideally Ruby's URI would do that for us, but for some reason it doesn't.

affected code