in reply to Posting request to an HTTPS protected site through a proxy.

Ther "LWP::UserAgent Proxy Support " section of the Crypt::SSLeay POD might shed some light on why you're having trouble.

According to that, LWP::UserAgent does a GET, but some proxies expect a CONNECT for HTTPS urls.

Linda

  • Comment on Re: Posting request to an HTTPS protected site through a proxy.

Replies are listed 'Best First'.
Re: Re: Posting request to an HTTPS protected site through a proxy.
by inman (Curate) on Mar 01, 2004 at 18:35 UTC
    Thanks! Initial results look promising although I will need to re-try in the office. ++ to you!

    Update: The change worked!.

    For future reference, the code looks like this.

    # Create User Agent my $ua = LWP::UserAgent->new(timeout => 30, keep_alive => 10); # Use a proxy server if configured for normal HTTP $ua->proxy (['http'], $ProxyUrl) if $ProxyUrl; # Add Env var for Crypt::SSLeay $ENV{HTTPS_PROXY} = $ProxyUrl) if $ProxyUrl;