[4.1] 610b309 Correct regexp in examples
PÃ¥l Hermunn Johansen
hermunn at varnish-software.com
Tue Aug 8 11:52:06 CEST 2017
commit 610b309cbc6c20d29c9959c7a5bbfb456d3dcb59
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 02c86a4..023c7aa 100644
--- a/doc/sphinx/reference/varnish-cli.rst
+++ b/doc/sphinx/reference/varnish-cli.rst
@@ -426,7 +426,7 @@ Example: 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"::
- 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 553fd72..4be83c5 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -145,7 +145,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