Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

https requests through a proxy

by line_noise (Sexton)
on May 05, 2001 at 00:29 UTC ( [id://78112]=perlquestion: print w/replies, xml ) Need Help??

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.

Originally posted as a Categorized Question.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://78112]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (4)
As of 2024-04-25 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found