[squid-users] What is the proper way to close an ICAP transaction?

Felipe Arturo Polanco felipeapolanco at gmail.com
Tue Nov 26 19:52:58 UTC 2019


Hi,

We are sending an encapsulated HTTP 307 redirect webpage header whenever a
Virus is found and stop sending any other data after that, but squid
complains about ICAP failure when we do that:
Adaptation::Icap::Xaction::noteCommRead threw exception: corrupted chunk
size

We are not sending an ICAP header at this point because we already told
Squid ICAP 200 OK header and begun a body transaction, we send some chunks
back to the client for progress and hold the last part for scanning.

Ideally, we would like to just send our 307 to Squid and not having it
count as a failure.

On Tue, Nov 26, 2019 at 3:44 PM Alex Rousskov <
rousskov at measurement-factory.com> wrote:

> On 11/26/19 10:15 AM, Felipe Arturo Polanco wrote:
>
> > While we can successfully scan our files and do content adaptation, we
> > have been struggling to find a way to close the ICAP transaction before
> > passing the whole body back to squid and at the same time avoid squid
> > marking one icap failure.
>
> Squid needs a valid ICAP response. The right ICAP response status code
> depends on what you want Squid to do after receiving that response. You
> have mentioned what you do _not_ want Squid to do (i.e. increase the
> failure count), but that still leaves a lot of options.
>
>
> > This is for an ICAP server that does Virus scanning and if virus found,
> > the body is not sent back.
>
> What do you want Squid to do when the ICAP service finds a virus? For
> example, what message do you want Squid to send to the next HTTP hop?
>
> Alex.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20191126/180e7ac5/attachment-0001.html>


More information about the squid-users mailing list