Re: Problem with HTTP::Request/Headers

BluePatch@mel.meloo.com
Wed, 16 Jun 1999 16:23:09 +0200


On 16 Jun 99, at 14:28, Sean O Riordain wrote:

> If you simulate http/1.1 using telnet by hand, i.e.
> telnet www.01direct.fr 80
> GET / HTTP/1.1
> Host: www.01direct.fr
> 
> you will get just the HTTP/1.1 header followed by html... but nothing
> like "Apache/1.3.6" etc.... so if it isn't there, then lwp will have
> quite some difficultly getting it ;-)

If you try this without "Host: ...", you will get :
-----------------------------------------------------
Connected to www.01direct.fr.
Escape character is '^]'.
GET / HTTP/1.1

HTTP/1.1 400 Bad Request
Date: Wed, 16 Jun 1999 11:45:58 GMT
Server: Apache/1.3.1 (Unix)
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
...
--------------------------------------------------

and you get the server name ! May be an apache bug...

By the way, I did not found how to specify the protocol in the 
request, is this right ? 
-----------
my $request = new HTTP::Request( 'GET'=>shift );
$request->header(protocol=>"HTTP/1.1");
-----------

Cheers

Francis
See you

Francis