calling $ua->request expecting Keep-Alive

Tac/Smokescreen Action Network (tac@smokescreen.org)
Mon, 27 Sep 1999 10:36:06 -0400


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.  I've tried the following:

(1) setting the timeout.  No good -- the relevant content and headers are
gone when request() returns.
(2) calling request() with a callback function that dies after it finds the
meta-tag:  the callback function is never called, even with a low chunksize.
(3) trying simple_request() with the above, still not called.
(4) setting the method to HEAD, planning to just investigate the Connection:
header until it was Closed rather than Keep-Alive.  Unfortunately, the
header is not returned either, it still hangs.

I'm relatively new to this (but am absolutely thrilled with the possibility
of it working -- thanks Gisle!), so if I'm doing something obviously wrong
please jump out and say so.  I'm quite stuck on this problem.

TIA,

Tac