omegaweaponZ has asked for the wisdom of the Perl Monks concerning the following question:

I realize that Mechanize has updated their perl package a few times, but it still has trouble reading through HTTPS sites or quickly gathering the response code from HTTPS sites rather than HTTP. In an example one site produces a 200 response code when http but 500 when https. You can get to both via curl, so its not an issue with the system access, just using the package itself. What needs to be done to return the proper response code from https using mechanize?
use strict; use WWW::Mechanize; my $HTTPSURL = 'https://mysite'; my $mech = WWW::Mechanize->new(autocheck => 0); $mech->max_redirect(0); $mech->get($HTTPSURL); my $status = $mech->status(); print "$status should be 200, not 500!";

Replies are listed 'Best First'.
Re: Mechanize HTTPS
by Corion (Patriarch) on Jul 12, 2013 at 15:22 UTC
      Yes, that would be useful, no? Looks like I was missing a few items such as basic openssl packages and ssleay net and the https lwp package, so after installing all of this it now works