[squid-dev] Terminating ICAP requests for aborted HTTP requests

Alex Rousskov rousskov at measurement-factory.com
Thu Jul 12 14:52:51 UTC 2018

On 07/11/2018 10:16 AM, Amos Jeffries wrote:
> On 12/07/18 03:46, Alex Rousskov wrote:
>> Using last-chunk for aborted body termination is a bug. If Squid
>> terminates the body, it should not use the standard last-chunk. Like you
>> suggested below, Squid should either (half-)close the connection or
>> negotiate the use of a chunk extension, both indicating a premature body
>> termination.

> But the chunking here means end of *ICAP* message. Not end of HTTP message.

When an ICAP message delivery ends, the HTTP message delivery ends as
well: An HTTP message cannot be spread across multiple ICAP messages. In
many cases, the ICAP recipient cannot tell whether the HTTP message
delivery ended prematurely unless the ICAP sender closes the connection.
That inability to detect premature HTTP message termination is what this
thread is about.

> HTTP Transfer-Encoding messages are a problem though. In absence of a
> proper ICAP signal we should probably abort the ICAP connection at the
> end of what Squid has

Yes, that is option #1 suggested by Steve.

> If there *is* an ICAP signal then Squid should of course use that in all
> cases of early halted HTTP content.

There is no such signal. Adding that signal is option #2 suggested by Steve.


More information about the squid-dev mailing list