Okay....here's the deal
I've installed ActiveState's 5.8 version of Perl on Win2k
I ran 'ppm install http://theoryx5.uwinnipeg.ca/ppms/Crypt-SSLeay.ppd' (as recommended on Google Groups)
I copied code straight out of lwpcook on cpan for loading a webpage using HTTP and HTTPS
if my target is 'http://blah', then it loads just fine in a browser - no hassles, exactly what I expected (which is: URL is my perl script, content is the webpage specified in the script)
If I run the self-same script from a commandline, it also does what is expected (prints to screen the HTML that the target URL contains)
If I change the target to 'https://blah' then the browser hangs - processing, processing, doesn't stop
If I run the self-same script from a commandline, then it works as it did above - printing the HTML from the target URL
any ideas? did i miss a flag somewhere?
any insight or direction would be appreciated
code follows:
#!c:\perl\bin\perl.exe
use LWP::UserAgent;
$bup = 'http://ias4/error_403.html';
my $ua = LWP::UserAgent->new;
print "Content-type: text/html\r\n\r\n";
print $bup."\n";
my $req = HTTP::Request->new(GET => $bup);
$req->header('Accept' => 'text/html');
# send request
my $res = $ua->request($req);
# check the outcome
if ($res->is_success)
{ print $res->content; }
else
{ print "Error: " . $res->status_line . "\n"; }
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.