[squid-dev] [PATCH] Parser-NG conversion of ICAP pt2
Alex Rousskov
rousskov at measurement-factory.com
Mon Sep 21 15:50:49 UTC 2015
On 09/21/2015 08:46 AM, Amos Jeffries wrote:
> On 24/08/2015 8:40 a.m., Amos Jeffries wrote:
>> It turns out that ICAP implements has three distinct protocol parsers.
>>
>> I begin the ICAP parser conversion to the Parser-NG model with
>> ModXact::parseHeaders() - which was conflating both ICAP and HTTP, and
>> the HTTP directional parsers.
>>
>>
>> * splits the exiting parse method into 3 distinct stages; ICAP-reply,
>> HTTP-request, HTTP-reply. Each stage is sequential and controlled by the
>> Encapsulated header contents.
>>
>> I'm not sure yet if we need to be tolerant of out-of-order segments in
>> the payload. The spec is pretty clear that order is explicit and
>> specific. But the old parser actually ignored the Encapsulated header
>> byte offsets (!!).
>
> FTR: that is <http://bugs.squid-cache.org/show_bug.cgi?id=2480>
We should continue to ignore offsets [by default] IMO. Not doing so is
likely to result in many needless interoperability problems. There are
many poorly written ICAP services out there.
Skipping bogus parts (bug 2480) is fine as a minor interoperability
improvement if it is easy to do so. We do not need to parse offsets to
skip a part.
I would not add support for out-of-order parts unless it does not
complicate the code at all and is explicitly requested.
HTH,
Alex.
More information about the squid-dev
mailing list