I have just looked through the documentation for HTTP and LWP but can not
find a way to interrogate the client for version etc. I would think that
that data would be in the header of the request.

use HTTP::Daemon;
use HTTP::Status;
my $d = HTTP::Daemon->new(      LocalPort => 8080);
print "Please contact me at: <URL:", $d->url, ">\n";
while (my $c = $d->accept)
{
        while (my $r = $c->get_request)
        {
                print "protocol: " . $r->protocol . "\n";
                print "headers: " . $r->headers . "\n";
                print "uri: " . $r->uri . "\n";
                print "content: " . $r->content . "\n";
                print "Method: " . $r->method . "\n";
                print "Path: " . $r->url->path . "\n";

The above code yields:
Please contact me at: <URL:http://bullockha:8080/>
protocol: HTTP/1.1
headers: HTTP::Headers=HASH(0x1c5d150)
uri: /auto.proxy
content:
Method: GET
Path: /auto.proxy

How do I get the details of "HTTP::Headers=HASH(0x1c5d150)"?


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to