[squid-users] Icap preview size
Niels Hofmans
hello at ironpeak.be
Sat Mar 6 10:09:00 UTC 2021
Hi Alex,
I’ve uploaded a tcpdump sample of where I’m requesting an image through squid + icap and where you can see the image response being posted fully to the ICAP service.
Headers passed on are Preview: 0 for RESPMOD and Transfer-Preview: *. (I only need the headers for the response)
PCAP: https://www.mediafire.com/file/k7zs51lg9s5ka3h/icap.pcap/file <https://www.mediafire.com/file/k7zs51lg9s5ka3h/icap.pcap/file>
Many thanks for co-debugging. :-)
Enjoy your weekend!
Regards,
Niels Hofmans
SITE https://ironpeak.be
BTW BE0694785660
BANK BE76068909740795
On 5 Mar 2021, at 23:32, Alex Rousskov <rousskov at measurement-factory.com> wrote:
On 3/5/21 5:21 PM, Niels Hofmans wrote:
> I receive that large payload right after an OPTIONS call to my ICAP endpoint. It is the preview.
The timing of an ICAP request does not determine whether that request
has a Preview stage and whether the "unexpected" body bytes were sent
during that Preview stage. I am asking these questions because I want to
determine whether Squid increases Preview size beyond what your server
has requested or does not send Preview at all.
Please share the ICAP headers of the problematic REQMOD request and the
last chunk metadata of that request body. You can get the latter from a
packet capture if your ICAP server does not report it in a convenient
form. In fact, sharing (a pointer to) the packet capture of the whole
problematic ICAP request is probably a good idea!
Alex.
> On 5 Mar 2021, at 17:21, Alex Rousskov wrote:
>
> On 3/5/21 2:55 AM, Niels Hofmans wrote:
>
>> One more: I believe ICAP is not respecting the Preview header for REQMOD
>> nor RESPMOD.
>
>> For the REQMOD OPTIONS requests, I respond with:
>>
>> ICAP/1.0 200 OK
>> Allow: 200,204
>> Connection: close
>> Date: Fri, 05 Mar 2021 07:34:56 GMT
>> Encapsulated: null-body=0
>> Methods: REQMOD
>> Preview: 64000
>>
>> However in my ICAP service, I often receive a request body over 64000
>> bytes, e.g. 1000000 request bytes.
>
> Receive when? During preview, instead of Preview, and/or after Preview?
>
>
>> I also noticed that a "Preview: 0” will not have any effect and the ICAP
>> service will still receive a complete HTTP REQMOD+REQRESP body.
>
> Receive when? During preview, instead of Preview, and/or after Preview?
>
> Alex.
>
>
>
>> icap_enable on
>> icap_connect_timeout 1 second
>> icap_service_failure_limit -1
>> icap_send_client_ip on
>> icap_preview_size 0
>> icap_persistent_connections on
>> icap_service service_req reqmod_precache bypass=0 icap://172.17.0.2:1344/request <icap://172.17.0.2:1344/request>
>> icap_service service_res respmod_precache bypass=0 icap://172.17.0.2:1344/response <icap://172.17.0.2:1344/response>
>> icap_preview_enable on
>> adaptation_access service_req allow all
>> adaptation_access service_res allow all
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20210306/3c461bb1/attachment.htm>
More information about the squid-users
mailing list