[squid-dev] is this really an ICAP 206 response "protocol error", if so what?

Eliezer Croitoru eliezer at ngtech.co.il
Thu Nov 12 23:09:08 UTC 2015


I have been experimenting with ICAP and 206 response.
I usually need only 200 or 204 ICAP response to either modify the whole 
response or to not change it at all but I have seen that squid cannot 
cache responses if they do not have a specific property.
To somehow handle this issue I wrote a small ICAP service which modify 
only the response headers but not the body.
I have found documentation on such an option in the ICAP forum but not 
in the RFC at:
http://www.icap-forum.org/documents/specification/draft-icap-ext-partial-content-07.html#ex_wout_preview
(Figure 3)

The idea to adapt only the response headers seems to work in most cases 
but I have couple special cases which result in a "protocol error" but 
nothing more then that.
I have attached two wireshark dumps which one works while the other 
result in a protocol error.

I have tried to understand what is wrong with if at all since from the 
code point of view both requests+responses was produced by the same 
exact logic.
I am unsure what the issue is but I know that it only happens with a 206 
response since at the exact same time a similar ICAP service works on 
the same url and response with a 204 which works(ICAP service built from 
the same library).
I have also tested the same test cases but with a 200 response that has 
a fixed string body and it works fine.

So I narrowed it down to the case which I response with a 206 to 
specific requests+responses.

I have tried couple times to compare with wireshark to find a clue that 
will might show me what the issue is but have not found it yet.

However I did noticed that my ICAP service strips the Content-Length 
headers in the response and it is a bug but to my understanding it 
should not affect the ICAP level issues of the picture.

So what I need is to understand: What squid have seen in the ICAP 
response as an error? if it's the ICAP service error I will probably be 
able to fix the issue.
If it's related to squid issue and not the ICAP service I will be happy 
to file a bug.

Thanks,
Eliezer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: google_ads_icap_dump.pcap
Type: application/octet-stream
Size: 3198 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20151113/b7d93863/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: icap_dump_protocol_error.pcap
Type: application/octet-stream
Size: 2601 bytes
Desc: not available
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20151113/b7d93863/attachment-0001.obj>


More information about the squid-dev mailing list