LWP, https and a proxy
l.g.h_at_caramail.com
Date: 02/22/05
- Previous message: Ron Savage: "ANNOUNCE: Image::Magick::Tiler V 1.00"
- Next in thread: Terrence Brannon: "Re: LWP, https and a proxy"
- Reply: Terrence Brannon: "Re: LWP, https and a proxy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Feb 2005 06:43:53 -0800
Hello,
I'm trying to use LWP module to access a secured website via a proxy (
standard proxy which forward to a ms proxy server )
Symptoms:
I can access successfully any non-secure website (http), but when I try
to access a https website, I got "<html></html>" as data and a 200
response code from the http server.
An application ( such as Mozilla ) with the same proxy parameters
access successfully to any secured or non secured websites.
With Ethereal, the only difference seems to be that mozilla/ie uses the
CONNECT directive instead of the GET directive of LWP.
And when mozilla/ie receive a 200 "connection etablished", they send
another "CONNECT" request to the proxy, and then get successfully the
requested webpage.
So I used the CONNECT method too. But it doesn't works better.
Here's what I wrote: ( I use activestate perl 5.8.4 )
___________________________________
$ua = LWP::UserAgent->new(redirect => '5');
$ua->proxy('http', 'http://127.0.0.1:5865/');
$ua->proxy('https', 'http://127.0.0.1:5865/');
$request = new HTTP::Request CONNECT => 'https://www.axabanque.fr/'; #
same issue with GET
$response = $ua->request($request);
print $response->as_string;
if ($response->is_success) {
print $response->content . $response->as_string;
}
else {
die $response->status_line . $response->as_string;
}
______________________________________
Thanks in advance for any ideas ...
Luc
- Previous message: Ron Savage: "ANNOUNCE: Image::Magick::Tiler V 1.00"
- Next in thread: Terrence Brannon: "Re: LWP, https and a proxy"
- Reply: Terrence Brannon: "Re: LWP, https and a proxy"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|