r5067 - trunk/varnish-cache/doc/sphinx/reference
kristian at varnish-cache.org
kristian at varnish-cache.org
Mon Aug 2 21:36:29 CEST 2010
Author: kristian
Date: 2010-08-02 21:36:28 +0200 (Mon, 02 Aug 2010)
New Revision: 5067
Modified:
trunk/varnish-cache/doc/sphinx/reference/vcl.rst
Log:
Update vcl(7) for 2.1: return(foo) is mandatory.
Modified: trunk/varnish-cache/doc/sphinx/reference/vcl.rst
===================================================================
--- trunk/varnish-cache/doc/sphinx/reference/vcl.rst 2010-08-02 19:29:49 UTC (rev 5066)
+++ trunk/varnish-cache/doc/sphinx/reference/vcl.rst 2010-08-02 19:36:28 UTC (rev 5067)
@@ -229,7 +229,7 @@
To match an IP address against an ACL, simply use the match operator:::
if (client.ip ~ local) {
- pipe;
+ return (pipe);
}
Grace
@@ -276,7 +276,7 @@
sub pipe_if_local {
if (client.ip ~ local) {
- pipe;
+ return (pipe);
}
}
@@ -594,8 +594,8 @@
# Normalize the Host: header
if (req.http.host ~ "^(www.)?example.com$") {
set req.http.host = "www.example.com";
- }
- }
+ }
+ }
HTTP headers can be removed entirely using the remove keyword:::
@@ -651,7 +651,7 @@
sub vcl_fetch {
if (obj.ttl < 120s) {
- set obj.ttl = 120s;
+ set obj.ttl = 120s;
}
}
@@ -660,13 +660,13 @@
sub vcl_recv {
if (req.request == "GET" && req.http.cookie) {
- call(lookup);
+ return(lookup);
}
}
sub vcl_fetch {
if (beresp.http.Set-Cookie) {
- deliver;
+ return(deliver);
}
}
@@ -680,11 +680,11 @@
sub vcl_recv {
if (req.request == "PURGE") {
- if (!client.ip ~ purge) {
- error 405 "Not allowed.";
+ if (!client.ip ~ purge) {
+ error 405 "Not allowed.";
+ }
+ return(lookup);
}
- lookup;
- }
}
sub vcl_hit {
More information about the varnish-commit
mailing list