I think the problem is because the url that you are requesting is an HTTPS
page. I tested couple of pages with https protocol, it all show no such
file or directory error.
-----Original Message-----
From: Alain Knaff [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 26, 1999 11:22 AM
To: [EMAIL PROTECTED]
Subject: Https problems
I'm trying to use LWP to get a https page, but the request always
returns with is_success = 0. According to straces output, it doesn't
even attempt to do any network connection. Here is the script that I
am using:
====================================================================
#!/usr/bin/perl
use English;
use LWP::UserAgent;
sub getTradingPage {
my ($ticker) = @_;
$ua = new LWP::UserAgent;
$ua->agent("Mozilla" . $ua->agent);
$req = new HTTP::Request GET =>
"https://trading.etrade.com/cgi-bin/gx.cgi/applogic+TradeMain";
# $req->header(Cookie => $cookie);
$res = $ua->request($req);
if (! $res->is_success) {
die "Bad luck this time: ".$res->is_success." ($ERRNO)\n";
}
print "res=".$res->content()."\n";
return $res->content();
}
$string = getTradingPage();
print "page=$string\n";
====================================================================
What am I doing wrong?
Alain