http://www.perlmonks.org?node_id=78114

line_noise has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to pass https requests through a squid proxy
with LWP::UserAgent and having no luck. The relevant code
looks something like this.

$PROXY_IP = "proxy.mydomain.com:8080"; $ua = LWP::UserAgent->new; $ua->proxy(['http', 'https'], "http://$PROXY_IP/"); $URL = "https://www.somedomain.com/index.htm"; $request = HTTP::Request->new('GET', "$URL"); $response = $ua->request($request);
At which I get back a response from the proxy server that says:

The following error was encountered: Unsupported Request Method and Protocol Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request.

the last of which I find a bit insulting...
Any suggestions? Does the proxy method not know that it
needs to send a CONNECT and wait for a RC200 from the proxy
so it can build a tunnel to the actual server? What gives?

Thanks.