]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression fix: Replacing reply headers
authorMarco Beck <mbeck@miamod.de>
Fri, 1 Apr 2011 01:21:46 +0000 (19:21 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 1 Apr 2011 01:21:46 +0000 (19:21 -0600)
Restores the functionality to replace reply headers as found in Squid 2.
header_replace worked for both request and reply headers back then.

The creation of request_header_access and reply_header_access altered
replace_headers to only work on requests. It should have received this
name split back then.

doc/release-notes/release-3.1.sgml
src/cf.data.pre

index b1d903eaed483621ad18ee91fab3f2b0b47d0302..87571984c1b5fb269bad3f4d263ee9dfffc06f2b 100644 (file)
@@ -701,6 +701,22 @@ This section gives a thorough account of those changes in three categories:
        <p>Controls how many different forward paths Squid will try
        before giving up. Default: 10
 
+       <tag>reply_header_replace</tag>
+       <p>This option allows you to change the contents of reply headers.
+       <verb>
+       In Squid 2 header_replace (now deprecated) worked for both requests
+       and replies, while in Squid 3 it only did respect request headers.
+       This option brings back the functionality to replace the contents of
+       reply headers. Consult the documentation for usage details.
+
+       <tag>request_header_replace</tag>
+       <p>This option allows you to change the contents of request headers.
+       <verb>
+       To be consistent with the naming changes of header_access in Squid 3
+       (header_access has been split into two options request_header_access
+       and reply_header_access), header_replace (now deprecated) is being
+       replaced by request_header_replace.
+
        <tag>icap_log</tag>
        <p>New option to write ICAP log files record ICAP transaction summaries, one line per
         transaction. Similar to access.log.
@@ -1091,6 +1107,9 @@ NOCOMMENT_START
        X-Forwarded-For entries, and place itself as the sole entry.
        </verb>
 
+       <tag>header_replace</tag>
+       <p>Deprecated. Use request_header_replace or reply_header_replace instead.
+
        <tag>http_port transparent intercept ssl-bump connection-auth[=on|off] ignore-cc</tag>
        <p>Option 'transparent' is being deprecated in favour of 'intercept' which more clearly identifies what the option does.
        For now option 'tproxy' remains with old behaviour meaning fully-invisible proxy using TPROXY support.</p>
index 14c8d41e944739e32736c18327195739e26b9550..b504918b3783e8ecaf1b941b55f2e4dce05c208f 100644 (file)
@@ -3915,18 +3915,18 @@ DOC_START
        performed).
 DOC_END
 
-NAME: header_replace
+NAME: request_header_replace header_replace
 IFDEF: HTTP_VIOLATIONS
 TYPE: http_header_replace[]
 LOC: Config.request_header_access
 DEFAULT: none
 DOC_START
-       Usage:   header_replace header_name message
-       Example: header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
+       Usage:   request_header_replace header_name message
+       Example: request_header_replace User-Agent Nutscrape/1.0 (CP/M; 8-bit)
 
        This option allows you to change the contents of headers
-       denied with header_access above, by replacing them with
-       some fixed string. This replaces the old fake_user_agent
+       denied with request_header_access above, by replacing them
+       with some fixed string. This replaces the old fake_user_agent
        option.
 
        This only applies to request headers, not reply headers.
@@ -3934,6 +3934,24 @@ DOC_START
        By default, headers are removed if denied.
 DOC_END
 
+NAME: reply_header_replace
+IFDEF: HTTP_VIOLATIONS
+TYPE: http_header_replace[]
+LOC: Config.reply_header_access
+DEFAULT: none
+DOC_START
+        Usage:   reply_header_replace header_name message
+        Example: reply_header_replace Server Foo/1.0
+
+        This option allows you to change the contents of headers
+        denied with reply_header_access above, by replacing them
+        with some fixed string.
+
+        This only applies to reply headers, not request headers.
+
+        By default, headers are removed if denied.
+DOC_END
+
 NAME: relaxed_header_parser
 COMMENT: on|off|warn
 TYPE: tristate