Re: Problem with HTTP::Request/Headers

Sean O Riordain (sean.oriordain@cyrona.com)
Wed, 16 Jun 1999 14:28:15 +0100


Hi Francis,
If you simulate http/1.0 using telnet by hand, i.e.
telnet www.01direct.fr 80
GET / HTTP/1.0

you will get absolutely nothing...

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 ;-)

cheers,
Sen




BluePatch@mel.meloo.com wrote:
> 
> Hello, I made a short program to get the type of a server.
> 
> Here is a part of the source :
> -8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<---
> use HTTP::Headers;
> use LWP::UserAgent;
> 
> my $request = new HTTP::Request(
> 'GET'=>"http://www.01direct.fr" );
> 
> my $ua = new LWP::UserAgent;
> my $response = $ua->request($request) || return "ERROR\t$!";
> 
> print $response->server;
> -8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<---
> 
> it works for most of web server but not this one : www.01direct.fr
> (for exemple).
> 
> Could you help me ?
> 
> Thanx
> 
> Francis
> Francis