Henrik, Thank you for that info. In doing this I noticed something that may not be considered a bug but maybe an annoyance?...you decide.
The format stated is:
If your proxy requires authentication, you can specify the username and password inside the proxy-part of the URL, e.g.
http://fred:Wilma1 at webproxy.sample.com:3128/http://www.foo.com/
will authenticate to the proxy using a username of "fred" and a password of "Wilma1", before requesting the proxy to fetch the www.foo.com homepage
But my password contains the "@" symbol (which appears to be the delimiter between password and proxy server) and when I used it in this example:
http://kevin:p at ssword@webproxy.sample.com:8080/http://www.foo.com/
I got a DNS error. I am guessing it thought my proxy was "ssword" or maybe "ssword at webproxy.sample.com which is incorrect and could no be resolved. Is there a way around this?
In my case, I just created another user with a password that didn't contain the "@" but this might not be possible for others.
-----Original Message----- From: Henrik Stoerner [mailto:henrik at hswn.dk] Sent: Thursday, January 27, 2005 2:17 AM To: hobbit at hswn.dk Subject: Re: [hobbit] Http test behind proxy Importance: Low
On Wed, Jan 26, 2005 at 11:52:54PM -0500, Kevin Hanrahan wrote:
My Hobbit server sits behind a proxy server that requires authentication before it will allow access to the internet. How do I test external hosts (for http for instance) from here? Is there a way to pass credentials to the proxy server to allow access?
See the bb-hosts man-page, in the section "HTTP Testing via proxy"
Henrik
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
On Fri, Jan 28, 2005 at 01:42:51PM -0500, Kevin Hanrahan wrote:
If your proxy requires authentication, you can specify the username and password inside the proxy-part of the URL, e.g.
http://fred:Wilma1 at webproxy.sample.com:3128/http://www.foo.com/ will authenticate to the proxy using a username of "fred" and a password of "Wilma1", before requesting the proxy to fetch the www.foo.com homepage
But my password contains the "@" symbol
Yuck - and you're in trouble too if it contains a ":". Right ... How about escaping it the way you normally do with URL's ? I.e instead of "@" you'd have "%40" (because the ascii value for "@" is hex 40), does that seem reasonable ? If so, then it's a simple one-line change. And it will only break the setup for those who already use authentication and have a "%" in their username or password ... --- lib/url.c 2005/01/20 22:02:23 1.9 +++ lib/url.c 2005/01/28 19:28:31 @@ -353,7 +353,7 @@ p = strchr(netloc, '@'); if (p) { *p = '\0'; - url->auth = strdup(netloc); + url->auth = strdup(urlunescape(netloc)); netloc = (p+1); } p = strchr(netloc, '='); Henrik
participants (2)
-
henrik@hswn.dk
-
Kevin@ewormhole.com