[4.1] 5995222 Clarify %r formatter wrt multiple Host headers

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Thu Jan 26 16:38:04 CET 2017


commit 5995222461de8a92f1bff61dc519c7f7f860d337
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Thu Jan 19 22:03:27 2017 +0000

    Clarify %r formatter wrt multiple Host headers
    
    Also clarify %{X}i and %{X}o wrt multiple X headers.
    
    Fixes #2190.
    
    Conflicts:
    	doc/sphinx/reference/varnishncsa.rst

diff --git a/doc/sphinx/reference/varnishncsa.rst b/doc/sphinx/reference/varnishncsa.rst
index 55c38a8..3022c92 100644
--- a/doc/sphinx/reference/varnishncsa.rst
+++ b/doc/sphinx/reference/varnishncsa.rst
@@ -98,7 +98,8 @@ Supported formatters are:
   total bytes sent to the backend.
 
 %{X}i
-  The contents of request header X.
+  The contents of request header X. If the header appears multiple times
+  in a single transaction, the last occurrence is used.
 
 %l
   Remote logname. Always '-'.
@@ -107,7 +108,8 @@ Supported formatters are:
   Request method. Defaults to '-' if not known.
 
 %{X}o
-  The contents of response header X.
+  The contents of response header X. If the header appears multiple
+  times in a single transaction, the last occurrence is used.
 
 %O
   In client mode, total bytes sent to client.  In backend mode, total
@@ -172,11 +174,13 @@ Supported formatters are:
   VCL_Log:key
     Output value set by std.log("key:value") in VCL.
 
-  VSL:tag or VSL:tag[field]
-    The value of the VSL entry for the given tag.  If field is specified,
-    only the selected part is shown.  Defaults to '-' when the tag is not
-    seen, or when the field is out of bounds.  If a tag appears several
-    times in a single transaction, only the first occurrence is used.
+  VSL:tag[field]
+    The value of the VSL entry for the given tag. The field will,
+    if present, treat the log record as a white space separated list
+    of fields, and only the nth part of the record will be matched
+    against. Fields start counting at 1. Defaults to '-' when the tag
+    is not seen, or when the field is out of bounds. If a tag appears
+    multiple times in a single transaction, the first occurrence is used.
 
 SIGNALS
 =======
@@ -191,7 +195,9 @@ NOTES
 =====
 
 The %r formatter is equivalent to "%m http://%{Host}i%U%q %H". This
-differs from apache's %r behavior. For the latter use "%m %U%q %H".
+differs from apache's %r behavior, equivalent to "%m %U%q %H".
+Furthermore, when using the %r formatter, if the Host header appears
+multiple times in a single transaction, the first occurrence is used.
 
 EXAMPLE
 =======



More information about the varnish-commit mailing list