Re: Updated: pipelined/halfclosed connections

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Thu, 26 Feb 2004 10:42:21 +0100 (CET)

On Thu, 26 Feb 2004, Adrian Chadd wrote:

> Right, ok. I'm not seeing any half-closed logic popping up in the
> squid logfiles.

Right.. this is probably due to a mixup in my thoughts..

For Squid to detect half-closed connection it must be trying to read
another request. So if you have sent two requests the half-closed
connection will only get detected once the first response is finished
(second request kicked alive).

So in addition to the scenarios outlined earlier you also need to test
with 1 and 1.5 requests. And while you are at it also test with 0.5
requests to verify that all the resumed parsing and abort cases work
properly..

Here is a more complete list of test cases and what is expected to happen:

Normal connection:

0.5 wait for rest of request
1 process request and continue reading
1.5 process first request and continue reading waiting
        for complete second request
2 parse both requests. once first finished continue
        trying to read a third request
2.5 as above, but with partially read third request in buffer
3 parse third request after finishing first reply.

Half-closed:

0.5 abort
1 process request. connection half-closed. close
        connection when reply done.
1.5 abort
2 process requests. After first reply connection detected
        half-closed when continuing reading new requests.
        close connection when all replies done.
2.5 abort after first reply done (no parsing of that .5
        request should occur until then, so we don't know it
        is partial until then)
3 process requests. After second reply connection detected
        half-closed when continuing reading new requests.
        close connection when all reples done.

Regards
Henrik
Received on Thu Feb 26 2004 - 02:42:26 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:04 MST