Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I need to write a script that fetches multiple documents over a single tcp session using HTTP/1.1. Does anyone have a recipe for doing something like this? I had thought to use LWP but I don't believe it supports pipelining yet (refer here for details...looks like this feature won't be ready until LWP6). Is LWPng usable for this sort of thing yet, or is there a better method for now?

Replies are listed 'Best First'.
Re: HTTP/1.1 Pipelining with Perl?
by sgifford (Prior) on Jun 24, 2006 at 04:05 UTC
    Fetching multiple documents uses the Keep-alive header, not pipelining. I do this with a current version of LWP with:
    my $ua = LWP::UserAgent->new(keep_alive => 10) or die "Couldn't create LWP UserAgent\n";