Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: WWW::Mechanize (and LWP) should use CONNECT for HTTPS request when a proxy is used?

by spunk (Acolyte)
on Dec 10, 2006 at 17:18 UTC ( [id://588908]=note: print w/replies, xml ) Need Help??


in reply to Re: WWW::Mechanize (and LWP) should use CONNECT for HTTPS request when a proxy is used?
in thread WWW::Mechanize (and LWP) should use CONNECT for HTTPS request when a proxy is used?

Hello,

Thank you for the response. I agree, HTTP is not HTTPS and I had not thought to try this. But changing this line of code only serves to confuse Perl about where the proxy is located. The proxy no longer sees any traffic and the script just hangs without doing anything. I haven't confirmed this with a packet sniffer, but I'd guess that this change directs all outgoing HTTPS traffic to port 443 of the proxy machine, rather than port 8118 where it should go.

I should point out that I need both HTTP and HTTPS to go through the proxy. I can think of very few sites that are purely HTTPS. Yahoo, for instance, would use HTTPS for authentication and then move back to HTTP for most other pages.

I think that CONNECT needs to be implemented in HTTP::Request, then WWW::Mechanize needs to test if a proxy is defined and if it's for HTTPS, then call CONNECT rather than GET. I just wish I knew that this was the right thing to do before I modify these packages...

Thanks again for your suggestion.

  • Comment on Re^2: WWW::Mechanize (and LWP) should use CONNECT for HTTPS request when a proxy is used?

Replies are listed 'Best First'.
Re^3: WWW::Mechanize (and LWP) should use CONNECT for HTTPS request when a proxy is used?
by ocsatire (Initiate) on Dec 21, 2007 at 22:59 UTC
    Spunk, Have you ever made this working?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-19 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found