Re: calling $ua->request expecting Keep-Alive

Gisle Aas (gisle@aas.no)
28 Sep 1999 21:59:29 +0200


Tac/Smokescreen Action Network <tac@smokescreen.org> writes:

> I'm submitting a form to a site that returns a partial page, with
> Connection: Keep-Alive in the header and a refresh meta tag in the content.
> 
> The web browser handles this fine -- it partially renders the page,
> displaying the "Please wait" message, and then keeps retrying the url (with
> a sessionid cookie) until the server sends back the relevant data.
> 
> I'm trying to simulate this with LWP::UserAgent, but it hangs on the call to
> the page.

LWP5 can't deal with persistent connections.  I don't think it would
be possible to easily convince it otherwise.  LWPng will do it if the
server speaks HTTP/1.1.  For HTTP/1.1 "keep-alive" is the default, and
the server have to send a "Connection: close" header if it wants the
old single-request-per-connection behaviour.

Regards,
Gisle