http://qs321.pair.com?node_id=1180482


in reply to Re: HTTPS returning 400 from Linux but 200 OK from Windows
in thread HTTPS returning 400 from Linux but 200 OK from Windows

I get those CPAN urls OK. It looks like the issue is only with HTTPS sites. I have HTTP_PROXY and HTTPS_PROXY set including user/pass details in the form HTTP_PROXY='http://user:pass@proxy.my.net:8080'

me@linuxbox:~> lwp-request -m get -USsed http://ppm.activestate.com/C +PAN/authors http://cpan.perl.org/authors? GET http://ppm.activestate.com/CPAN/authors/ User-Agent: lwp-request/5.810 GET http://ppm.activestate.com/CPAN/authors --> 301 Moved Permanently GET http://ppm.activestate.com/CPAN/authors/ --> 200 OK Cache-Control: proxy-revalidate Connection: close Date: Fri, 27 Jan 2017 16:11:05 GMT Age: 0 Server: Apache Content-Length: 4728 Content-Type: text/html;charset=UTF-8 Client-Date: Fri, 27 Jan 2017 16:11:53 GMT Client-Peer: 10.244.0.50:83 Client-Response-Num: 1 Title: Index of /CPAN/authors GET http://www.cpan.org/authors/? User-Agent: lwp-request/5.810 GET http://cpan.perl.org/authors? --> 301 Moved Permanently GET http://www.cpan.org/authors? --> 301 Moved Permanently GET http://www.cpan.org/authors/? --> 200 OK Cache-Control: proxy-revalidate Connection: close Date: Fri, 27 Jan 2017 16:11:54 GMT Via: 1.1 varnish-v4 Via: 1.1 varnish Via: 1.1 varnish Accept-Ranges: bytes Age: 0 Server: Apache/2.2.15 (CentOS) Vary: Accept-Encoding Content-Length: 4722 Content-Type: text/html;charset=UTF-8 Client-Date: Fri, 27 Jan 2017 16:11:54 GMT Client-Peer: 10.244.0.50:83 Client-Response-Num: 1 Fastly-Debug-Digest: 492dd663e1697be6e60aeecd19b5bf028765c1b3d66167d36 +df53fb8eefe26c0 Title: Index of /authors X-Cache: MISS, MISS X-Cache-Hits: 0, 0 X-Served-By: cache-lax8636-LAX, cache-bma7023-BMA X-Timer: S1485533514.441262,VS0,VE504
Now if I go for https://google.com
me@linuxbox:~> lwp-request -m get -USsed https://google.com GET https://google.com User-Agent: lwp-request/5.810 GET https://google.com --> 400 Bad Request Cache-Control: no-cache Connection: close Pragma: no-cache Content-Length: 677 Content-Type: text/html; charset=utf-8 Client-Date: Fri, 27 Jan 2017 16:16:23 GMT Client-Peer: 10.244.0.50:83 Client-Response-Num: 1 Proxy-Connection: close Title: Request Error
At this site I have the same proxt settings for http and https, which strikes me as odd, but works fine on my windows lappy.

Cheers,
R.

Pereant, qui ante nos nostra dixerunt!

Replies are listed 'Best First'.
Re^3: HTTPS returning 400 from Linux but 200 OK from Windows
by shadowsong (Pilgrim) on Feb 01, 2017 at 13:21 UTC

    Hi R

    Hmmm, try setting the following environment variables:

    HTTP_PROXY_USER=your_proxy_username HTTP_PROXY_PASS=your_proxy_password

    And update HTTP_PROXY to:

    HTTP_PROXY=http://proxy.my.net:8080

    Best of luck!
    Shadowsong