Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

by Corion (Patriarch)
on Feb 13, 2017 at 18:32 UTC ( [id://1181914]=note: print w/replies, xml ) Need Help??


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

Unfortunately, LWP::ConsoleLogger doesn't seem to be talkative about when it is trying to connect to a proxy.

You can try to find which proxy LWP will try to use:

#!perl -w use strict; use LWP::ConsoleLogger::Easy 'debug_ua'; use Data::Dumper; use LWP::UserAgent; my $ua=LWP::UserAgent->new(); warn Dumper $ua->proxy('https'); my $logger=debug_ua($ua,5); print Dumper \%ENV; $ua->env_proxy; warn Dumper $ua->proxy('https'); $ua->get('https://google.com')

This should show you that your proxy URL is in %ENV and also picked up from there in the $ua.

Maybe your proxy does not let Perl through? Have you tried masquerading your Perl script as curl (because that seems to work?)?:

$ua->default_headers->header('User-Agent' => 'curl/7.10.x (i386-redhat +-linux-gnu) libcurl/7.10.x OpenSSL/0.9.7a ipv6 zlib/1.1.4');

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-25 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found