Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: LWP::Simple on HTTPS sites

by rbhyland (Acolyte)
on Feb 25, 2017 at 09:32 UTC ( [id://1182808]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP::Simple on HTTPS sites
in thread LWP::Simple on HTTPS sites

Thanks for the clue. After some more research along that line I fixed by changing my GET code to look like this:
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0; my $ua = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0, SSL_verify_mode => IO::Soc +ket::SSL::SSL_VERIFY_NONE, },); my $req = HTTP::Request->new( GET => 'https://xkcd.com/'); my $response = $ua->request($req); my $content = $response->content; my $sitePrefix = 'https://xkcd.com/';
Now it works again. Thanks everyone!

Replies are listed 'Best First'.
Re^3: LWP::Simple on HTTPS sites
by noxxi (Pilgrim) on Feb 25, 2017 at 18:26 UTC
    So the result of your research is that you disable any kind of certificate validation? Since you access only comics this is probably not a big deal but for anything serious this would be a bad idea since you effectively disable the protection HTTPS offers.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 11:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found