in reply to Re: Proxy Authentication
in thread Proxy Authentication
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Proxy Authentication
by Corion (Patriarch) on Jun 10, 2004 at 15:18 UTC | |
Of course - ask the user for it:
In short, if you want to use data in a program, somehow that data needs to get to that program. There is no way around it. Also, regarding your manual proxy settings, "I could not get them to work" is not really helpfull, as the weather impedes my ESP abilities somewhat. Maybe you can describe to us a bit more precise what fails, and how it fails, and what the log messages and error messages are... | [reply] [d/l] |
|
Re^3: Proxy Authentication
by xiper (Friar) on Jun 11, 2004 at 04:39 UTC | |
I don't like the idea of passwords being in plain text either in the script or in the users environment. Do you know of anyway round that?Well, you could just manually (or semi-manually) add the raw header where <string> is a base64 encoded string containing the username and password separated by a colon, generated like so: and either manually print it in the right spot (after the GET or POST line) or, in your case, use HTTP::Headers and add $header as the third parameter to your HTTP::Request constructor: (insert usual disclaimers about passwords... blah blah... security through obscurity... blah blah...) - ><iper
| [reply] [d/l] [select] |
by rmb (Novice) on Jun 11, 2004 at 10:36 UTC | |
This looked very promising and tried the code below but get the 502 error. Is their a way of establishing exactly what the proxy is objecting to? I am sure that the domain\username and password are correct.
And this is the error that I am getting
Any advice appreciated. rmb | [reply] [d/l] [select] |
by dada (Chaplain) on Jun 11, 2004 at 21:14 UTC | |
you see, between a password in plain text in your user environment and a password base64-encoded on PerlMonks, I would prefer the first :-)
cheers, Aldo King of Laziness, Wizard of Impatience, Lord of Hubris | [reply] |
by xiper (Friar) on Jun 12, 2004 at 10:29 UTC | |
A good way to debug these things (as samtregar recently mentioned), is to write a small proxy using HTTP::Proxy, point your script & browser to it, and see what the difference is in the request header they send. Here's a snippit to get you started: Good luck! - ><iper
| [reply] [d/l] [select] |