Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: HTTPS returning 400 from Linux but 200 OK from Windows

by Random_Walk (Prior)
on Jan 27, 2017 at 16:18 UTC ( #1180482=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2021-04-11 19:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?