[master] 787133e Correct regexp in examples

Federico G. Schwindt fgsch at lodoss.net
Mon Aug 7 15:18:06 CEST 2017


commit 787133e6967652df6dbcf3b83b3f9b9b1a1e7ad7
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Mon Aug 7 14:16:10 2017 +0100

    Correct regexp in examples
    
    Fixes #2380.

diff --git a/doc/sphinx/reference/varnish-cli.rst b/doc/sphinx/reference/varnish-cli.rst
index 6557284..37d4760 100644
--- a/doc/sphinx/reference/varnish-cli.rst
+++ b/doc/sphinx/reference/varnish-cli.rst
@@ -355,7 +355,7 @@ Ban all documents where the serving host is "example.com" or
 "www.example.com", and where the Set-Cookie header received from the
 backend contains "USERID=1663"::
 
-    ban req.http.host ~ "^(?i)(www\\.)example.com$" && obj.http.set-cookie ~ "USERID=1663"
+    ban req.http.host ~ "^(?i)(www\\.)?example\\.com$" && obj.http.set-cookie ~ "USERID=1663"
 
 AUTHORS
 =======
diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index cb50b6e..e826779 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -158,7 +158,7 @@ To send flags to the PCRE engine, such as to do case insensitive matching, add
 the flag within parens following a question mark, like this::
 
     # If host is NOT example dot com..
-    if (req.http.host !~ "(?i)example.com$") {
+    if (req.http.host !~ "(?i)example\.com$") {
         ...
     }
 



More information about the varnish-commit mailing list