[squid-dev] [PATCH] Parser-NG conversion of ICAP pt2

Amos Jeffries squid3 at treenet.co.nz
Mon Sep 21 14:46:16 UTC 2015


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>

> 
> 
> * adds "ICAP" / "icap" to the registered protocol types and scheme
> names, and associated Icap::ProtocolVersion() infrastructure.
> 
> * adds Adaptation::Icap::ResponseParser class extending
> Http1::ResponseParser with ICAP related details and first-line parser.
> 
> * documented some security and performance improvements that can be made
> as a followup in ModXact::parseHeaders()
> 
> 
> 
> There is some weird race behaviour I still want to verify if trunk has
> too. But have gone with PATCH instead of PREVIEW since this seems like a
> good place to pause. Leaving most polish and some major bug fixes to
> followups. That includes the other two parsers in adaptation/icap/.
> 

Amos



More information about the squid-dev mailing list