]> git.ipfire.org Git - thirdparty/squid.git/commit - src/HttpHeaderTools.cc
Add request_header_add option
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Jul 2012 14:25:06 +0000 (17:25 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Tue, 17 Jul 2012 14:25:06 +0000 (17:25 +0300)
commitf4698e0b79fa14c3ae1758eb36561aaa39344cd7
tree7e44794f32b6503514335fbe8bb1225fc755a81b
parent41ebd3975f9f230c1c9eb8ec25358c9da985762d
Add request_header_add option

This patch:

- Add request_header_add, a new ACL-driven squid.conf option that
  allow addition of HTTP request header fields before the request is sent to
  the next HTTP hop (a peer proxy or an origin server):
     request_header_add <field-name> <field-value> acl1 [acl2]
  where:
     * Field-name is a token specifying an HTTP header name.

     * Field-value is either a constant token or a quoted string containing
       %macros. In theory, all of the logformat codes can be used as %macros.
       However, unlike logging the transaction may not yet have enough
       information to expand a macro when the new header value is needed.
       The macro will be expanded into a single dash ('-') in such cases.
       Not all macros have been tested.

     * One or more Squid ACLs may be specified to restrict header insertion to
       matching requests. The request_header_add option supports fast ACLs only.

- Add the %ssl::>cert_subject and %ssl::>cert_issuer logformating codes which
  prints the Subject field and Issuer field of the received client SSL
  certificate or a dash ('-').

This is a Measurement Factory project.
22 files changed:
src/AccessLogEntry.h
src/ConfigParser.cc
src/ConfigParser.h
src/HttpHeaderTools.cc
src/HttpHeaderTools.h
src/HttpRequest.cc
src/HttpRequest.h
src/Makefile.am
src/cache_cf.cc
src/cf.data.depend
src/cf.data.pre
src/client_side.cc
src/client_side_request.cc
src/format/ByteCode.h
src/format/Format.cc
src/format/Format.h
src/format/Token.cc
src/format/Token.h
src/http.cc
src/structs.h
src/tests/Stub.list
src/tests/stub_HttpRequest.cc