I am having trouble connecting to an HTTPS site with Mechanize. I can connect to other HTTPS sites with this same code. So, I don't think that this is an encryption problem. There appears to be something weird with the particular site below. The URL is correct and works in Chrome and Edge.
This particular site got hit with a massive ransomware attack some months back. Something subtle could have changed on this site when putting Humpty Dumpty back together again. My code has been working without problems for the last 5 years. Ideas?
use strict;
use warnings;
use WWW::Mechanize;
$|=1;
#my $page = 'https://contests.arrl.org/publiclogs.php?eid=18&iid=1049'
+;
my $page = 'https://contests.arrl.org/';
my $mech = WWW::Mechanize->new( autocheck => 1 );
$mech->get($page);
exit;
__END__
Error GETing https://contests.arrl.org/publiclogs.php?eid=18&iid=1049:
Can't connect to contests.arrl.org:443 (Bad file descriptor) at test.p
+l line 11.
Now with just the minimal URL, I get the same error:
Error GETing https://contests.arrl.org/: Can't connect to contests.arr
+l.org:443 (Bad file descriptor)
Update: Changed the code to not verify_hostname. I guess this is then a non-secure connection? I am not sure exactly what this does.
my $mech = WWW::Mechanize->new( autocheck => 1,
ssl_opts => { verify_hostname => 0}, )
+;
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.