]> git.ipfire.org Git - thirdparty/squid.git/commit - src/adaptation/icap/ModXact.cc
ICAP: Initial support for trailers
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Tue, 15 Nov 2016 05:08:59 +0000 (18:08 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 15 Nov 2016 05:08:59 +0000 (18:08 +1300)
commit69c698a38b5b015c6f98710a44a6c7fb95a86040
tree9f4c2a72412ebf7e5fef9e36ceab3a232fd38c36
parent5613c60dd88ebcdda984be3f02fe4ed8fe8825ef
ICAP: Initial support for trailers

ICAP trailers are currently specified by
https://datatracker.ietf.org/doc/draft-rousskov-icap-trailers/

This implementation complies with version -01 of that draft:

- Squid unconditionally announces ICAP Trailer support via the ICAP
  Allow request header field.

- Squid parses the ICAP response trailer if and only if the ICAP server
  signals its presence by sending both Trailer header and Allow/trailers
  in the ICAP response.

Squid logs and ignores all parsed ICAP header fields (for now).

Also refactored HttpHeader parsing methods in order to reuse them for
ICAP trailer parsing.

Also simplified and fixed headers isolating code while dealing with
empty (i.e. zero header fields) headers. Old httpMsgIsolateHeaders()
tried to re-implement header end detection/processing logic that is
actually covered by headersEnd(). Old httpMsgIsolateHeaders() could
return success for some garbage input (e.g., a buffer of several CRs)
even if no end of headers was found.
src/HttpHeader.cc
src/HttpHeader.h
src/HttpMsg.cc
src/adaptation/icap/ModXact.cc
src/adaptation/icap/ModXact.h
src/adaptation/icap/OptXact.cc
src/mime_header.h