develooper Front page | perl.libwww | Postings from January 2006

LWP::Parallel::UserAgent; HTTP 1.1, order of requests etc.

From:
=?ISO-8859-1?Q?Erik_Alap=E4=E4?=
Date:
January 11, 2006 08:20
Subject:
LWP::Parallel::UserAgent; HTTP 1.1, order of requests etc.
Message ID:
20060111165055.Q95258@treo.operax.com
Hello! I am using LWP::Parallel::UserAgent for writing some test
scripts. Some questions have come up:

1. Is it possible to make it send HTTP/1.1 as protocol string instead
of HTTP/1.0 (the server in the other end checks the HTTP header for
1.1)? I have tried
    my $req = HTTP::Request->new(POST, $url, $hdrs, $postdata);
    $req->protocol('HTTP/1.1');
    print $req->as_string;
and it prints the request header as if it was 1.1, but when I check with
Ethereal it seems that HTTP/1.0 is sent!


2. The documentation states that the replies collected when doing
wait() are sorted according to URL. What happens if all the requests
are using the same URL (I am connecting to a special server that
does some processing and constructs its replies based on the XML body
of the POSTs my Perl script is sending)? I am using
    $pua->in_order  (1);       # handle requests in order of registration
    $pua->nonblock  (1);       # non-blocking


3. Should I use LWPng instead or is it still to alpha:ish?

Best regards,

--
Erik Alapää
Software Engineer M. Sc., Lic. Ind. Math.

Aurorum Science Park 8
SE 997 75 Luleå
Sweden

+46 70 535 17 14 (mobile)
+46 920 75510  (fax)

http://www.operax.com



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About