Doug Marvin,
My problem is not with id and password, I am not there yet. I am being
returned a default page from our Webserver (no matter what the supplied URL)
by uncommenting the two lines in this script.
When I run this script for all URLs on our intranet I get the right
document. Looks like I am having problems setting up my proxy.
Past that, then probably I will end up with id/password issue.
Bob Gustafson - I do not have access to our Webserver machine. If you can
show me how to make "Netscape to open the door", I can run apache on my pc,
making it as the proxy for me, and it handing off the requests to our real
proxy.
Thanks again for your input and help.
Edwin Madari
(914)365-7613
[EMAIL PROTECTED]
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
my $ua = new LWP::UserAgent;
my $arg = shift || 'http://localhost/';
#$ua->proxy(['http', 'ftp'] => 'http://proxynt.corp.bam.com/proxy.pac');
my $req = new HTTP::Request 'GET', $arg;
#$req->proxy_authorization_basic("hello", "world");
my $res = $ua->request($req);
if ($res->is_success) {
print $res->as_string; #remove the noise
} else {
print "Failed: ", $res->status_line, "\n";
}
-----Original Message-----
From: Doug Monroe [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 24, 2000 2:38 PM
To: Marvin Simkin
Cc: bobgus%mcs.com; MadarEd%BAM.com; libwww%perl.org
Subject: Re: newbie request/question(s)
Marvin Simkin wrote:
>
> Edwin, if your proxy server is like mine what it wants is a header like
this
> on your request:
>
> Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
>
> The gobbledegook is a base-64 encoded rendition of your proxy id:password,
> that is, they are separated by a colon and then encoded.
>
> I think LWP should have a way to do this built in... I've seen others
talking
> about it. Apparently there is a document called the LWP cookbook
exactly- 'perldoc lwpcook' shows:
$req->proxy_authorization_basic("proxy_user", "proxy_password");
so:
$req->proxy_authorization_basic("Alladin", "open sesame");
oughta do it.
--
Doug Monroe