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

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

January 11, 2006 08:20
LWP::Parallel::UserAgent; HTTP 1.1, order of requests etc.
Message ID:
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);
    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å

+46 70 535 17 14 (mobile)
+46 920 75510  (fax) Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About