On 11.01.13 00:06, Amos Jeffries wrote:

So it seems apparent that after Squid delivers the clear-text
response, it abandons the socket but never closes it.  From looking in
the source, this is client_side.cc, and it has a comment:
    // XXX: Can this happen? CONNECT tunnels have deferredRequest set.
It looks to me as if the (conn->flags.readMore) section above should
be the bit being executed, although I don't quite understand deferred
requests.  In either case, it seems like we should close the socket if
it ever gets abandoned?

Calling conn->clientConnection->close() from else part where the connection is abandoned seems the right thing to do. Is there any situation where closing the connection when it is abandoned is the wrong thing to do?

However, since the CONNECT and the response were both served with a "Connection: keep-alive" header, it seems that readMore should really be true at this point anyway. clientProcessRequest() explicitly sets readMore = false for CONNECT requests, so I don't understand how Squid handles keep-alive CONNECT tunnels?

--

 - Steve Hill
   Technical Director
   Opendium Limited     http://www.opendium.com

Direct contacts:
   Instant messager: xmpp:[email protected]
   Email:            [email protected]
   Phone:            sip:[email protected]

Sales / enquiries contacts:
   Email:            [email protected]
   Phone:            +44-844-9791439 / sip:[email protected]

Support contacts:
   Email:            [email protected]
   Phone:            +44-844-4844916 / sip:[email protected]

Reply via email to