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


in reply to https through a proxy

Some time ago I had this same problem. The reason for this error is that LWP don't support HTTPS over proxy properly. It establishes TCP connection to a proxy, then creates SSL connection over TCP, and then sends "CONNECT needed-host\r\n" request. With real-world proxies (that is, squid:-), correct sequence is: create TCP connection to proxy, send "CONNECT xyz\r\n", and only then establish SSL connection. I had a patch for LWP somewhere, but it must be outdated by now. Mail me (igorash at mail.od.ua) and I'll send it to you.

Replies are listed 'Best First'.
Re: Re: https through a proxy
by line_noise (Sexton) on May 05, 2001 at 01:26 UTC
    Thanks a lot. I had a feeling the problem was along those
    lines. The really insane part is that the script I'm writing
    is itself a proxy, so that I can trap netscape's outgoing
    requests.