If you run tail -f access.log you'll see that the server received HTTP/1.0,
not HTTP/1.1. I traced to code to the request() routine in
LWP/Protocol/http.pm,
line 112:
my $request_line = "$method $fullpath HTTP/1.0$CRLF";
The string is harded-coded there. I'm using ActiveState Perl 620, the
$LWP::VERSION
is 5.48.
Chris
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
$Bill Luebkert
Sent: Tuesday, November 28, 2000 9:19 PM
To: Chris Song
Cc: [EMAIL PROTECTED]
Subject: Re: HTTP::Message->protocol() error?
Chris Song wrote:
>
> It seems to me that calling HTTP::Message->protocol() has not effect. The
> following
> perl program shows it. Has anyone seen it? I'm using Apache on NT 4. The
> access.log
> file shows the first line of the HTTP message. And it's always HTTP/1.0.
>
> Chris
>
> use strict;
> use LWP::UserAgent;
> my $ua = new LWP::UserAgent;
> $ua->agent("AgentName/0.1 " . $ua->agent);
>
> my $req = new HTTP::Request GET => 'http://localhost/hello.html';
> $req->protocol("HTTP/1.1");
>
> my $res = $ua->request($req);
>
> if ($res->is_success) {
> print $res->content;
> } else {
> print "Bad luck this time\n";
> }
Works OK for me, except it returns some weird number on the front of
the body and a 0 at the end. The number (right after the header and in hex)
is 12 less than the body length. Maybe that's part of 1.1 (never read up on
it).
Win98SE/Apache 1.3.14 (Win32)/AS Perl 522
--
,-/- __ _ _ $Bill Luebkert ICQ=14439852
(_/ / ) // // DBE Collectibles http://www.wgn.net/~dbe/
/ ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/
-/-' /___/_<_</_</_ http://www.freeyellow.com/members/dbecoll/
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web