]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression fix: Replacing reply headers
authorMarco Beck <mbeck@miamod.de>
Thu, 11 Aug 2011 16:29:57 +0000 (10:29 -0600)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 11 Aug 2011 16:29:57 +0000 (10:29 -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.

src/cf.data.pre

index c11105c3a12510c4f79954dcddcecc83f87ac091..88327b87824bdc4ed932a6ef209915745839a56a 100644 (file)
@@ -3106,18 +3106,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.
@@ -3125,6 +3125,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