[thelist] https through a proxy with Perl
phammar at dplanet.ch
phammar at dplanet.ch
Wed Dec 6 11:30:39 CST 2000
Hi,
A colleage has the following problem:
He's trying to access information from
a server using https through a proxy,
but the proxy returns the following :
HTTP/1.0 200 OK
Content-Type: text/html
Client-Date: Wed, 06 Dec 2000 17:00:37 GMT
Client-Peer: 10.0.253.2:80
Refresh: 0; URL=https://your.server.com/
<HTML></HTML>
So my question is:
How do I get the page itself and not the refresh information ?
Here's the script (adapted from the ActivePerl doc):
use LWP::UserAgent;
my $header = new HTTP::Headers;
$header->authorization_basic("uName", "pWord");
$header->user_agent("Mozilla/3.0");
$header->header("Accept" => "text/plain");
$uagent = new LWP::UserAgent;
$uagent->proxy(['https', 'ftp'] => 'http://proxy:80');
$wheretogo = "https://your.server.net/";
$req = new HTTP::Request ("GET" => $wheretogo, $header, "");
$req->proxy_authorization_basic("", "");
$result = $uagent->request($req);
print $result->as_string;
Any suggestions in Perl or ASP would be
warmly accepted. (the server runs NT)
TIA, Peter
More information about the thelist
mailing list