]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Regression fix: Replacing reply headers
authorMarco Beck <mbeck@miamod.de>
Fri, 25 Mar 2011 11:47:08 +0000 (00:47 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 25 Mar 2011 11:47:08 +0000 (00:47 +1300)
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 47d7223faa4c2941a4d7adfe8cc0e5d59b437022..dfba8b3b7198e4315b12647b235efced8dc3fb7d 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 the client IP 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 8ddc21cbcaed65e3cf2a1b6396f2a15690f9e720..7c6bce7db6eaf9cf3a11c496c9f7c6a7a7cdb867 100644 (file)
@@ -4374,18 +4374,18 @@ DOC_START
        performed).
 DOC_END
 
-NAME: header_replace
+NAME: request_header_replace header_replace
 IFDEF: USE_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.
@@ -4393,6 +4393,24 @@ DOC_START
        By default, headers are removed if denied.
 DOC_END
 
+NAME: reply_header_replace
+IFDEF: USE_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