A TCP client can finish sending a request and close its write side while continuing to wait for the reply. Squid's policy for that state matters when comparing a small raw TCP test with an HTTP client.

For Squid 7, the documented default is:

half_closed_clients off

With that policy, Squid closes a client connection when a read reports no more incoming data. With the option enabled, it can keep the connection until reading or writing encounters an error. The documentation recommends the default off policy for ordinary forward-proxy operation.

Record when the test client signals end-of-input. A pipeline that reaches stdin EOF can behave differently from a client that keeps its sending side open while reading the response, even when both sent the same HTTP request bytes.

If the test client terminates completely, it cannot read a reply that arrives afterward. A server-side half-close setting cannot change the lifetime of that client process.

Choose the client EOF behavior and the proxy policy together for the intended test. The half-close policy also assumes an HTTP message with valid framing; it does not supply a missing request body or repair an incomplete header block.

Tënë sô zo