<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Alex,<div class=""><br class=""></div><div class="">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.</div><div class="">Headers passed on are Preview: 0 for RESPMOD and Transfer-Preview: *. (I only need the headers for the response)</div><div class=""><br class=""></div><div class="">PCAP: <a href="https://www.mediafire.com/file/k7zs51lg9s5ka3h/icap.pcap/file" class="">https://www.mediafire.com/file/k7zs51lg9s5ka3h/icap.pcap/file</a></div><div class=""><br class=""></div><div class="">Many thanks for co-debugging. :-)</div><div class="">Enjoy your weekend!</div><div class=""><br class=""></div><div class="">Regards,<div class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;">Niels Hofmans<br class=""><br class="">SITE   <a href="https://ironpeak.be" class="">https://ironpeak.be</a><br class="">BTW   BE0694785660<br class="">BANK BE76068909740795</div>
</div>
<div><br class=""><div class="">On 5 Mar 2021, at 23:32, Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com" class="">rousskov@measurement-factory.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 3/5/21 5:21 PM, Niels Hofmans wrote:<br class=""><br class=""><blockquote type="cite" class="">I receive that large payload right after an OPTIONS call to my ICAP endpoint. It is the preview.<br class=""></blockquote><br class="">The timing of an ICAP request does not determine whether that request<br class="">has a Preview stage and whether the "unexpected" body bytes were sent<br class="">during that Preview stage. I am asking these questions because I want to<br class="">determine whether Squid increases Preview size beyond what your server<br class="">has requested or does not send Preview at all.<br class=""><br class="">Please share the ICAP headers of the problematic REQMOD request and the<br class="">last chunk metadata of that request body. You can get the latter from a<br class="">packet capture if your ICAP server does not report it in a convenient<br class="">form. In fact, sharing (a pointer to) the packet capture of the whole<br class="">problematic ICAP request is probably a good idea!<br class=""><br class="">Alex.<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">On 5 Mar 2021, at 17:21, Alex Rousskov wrote:<br class=""><br class="">On 3/5/21 2:55 AM, Niels Hofmans wrote:<br class=""><br class=""><blockquote type="cite" class="">One more: I believe ICAP is not respecting the Preview header for REQMOD<br class="">nor RESPMOD.<br class=""></blockquote><br class=""><blockquote type="cite" class="">For the REQMOD OPTIONS requests, I respond with:<br class=""><br class="">ICAP/1.0 200 OK<br class="">Allow: 200,204<br class="">Connection: close<br class="">Date: Fri, 05 Mar 2021 07:34:56 GMT<br class="">Encapsulated: null-body=0<br class="">Methods: REQMOD<br class="">Preview: 64000<br class=""><br class="">However in my ICAP service, I often receive a request body over 64000<br class="">bytes, e.g. 1000000 request bytes.<br class=""></blockquote><br class="">Receive when? During preview, instead of Preview, and/or after Preview?<br class=""><br class=""><br class=""><blockquote type="cite" class="">I also noticed that a "Preview: 0” will not have any effect and the ICAP<br class="">service will still receive a complete HTTP REQMOD+REQRESP body.<br class=""></blockquote><br class="">Receive when? During preview, instead of Preview, and/or after Preview?<br class=""><br class="">Alex.<br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">icap_enable on<br class="">icap_connect_timeout 1 second<br class="">icap_service_failure_limit -1<br class="">icap_send_client_ip    on<br class="">icap_preview_size 0<br class="">icap_persistent_connections on<br class="">icap_service service_req reqmod_precache bypass=0 <a href="icap://172.17.0.2:1344/request" class="">icap://172.17.0.2:1344/request</a> <<a href="icap://172.17.0.2:1344/request" class="">icap://172.17.0.2:1344/request</a>><br class="">icap_service service_res respmod_precache bypass=0 <a href="icap://172.17.0.2:1344/response" class="">icap://172.17.0.2:1344/response</a> <<a href="icap://172.17.0.2:1344/response" class="">icap://172.17.0.2:1344/response</a>><br class="">icap_preview_enable on<br class="">adaptation_access service_req allow all<br class="">adaptation_access service_res allow all<br class=""></blockquote><br class=""></blockquote><br class=""></div></div></div><br class=""></div></body></html>