[3.0] 050d0ff Add documentation of string syntax, rollback, panic and synthetic keywords.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:01:53 CEST 2011


commit 050d0ff33dfb7667c77dbc08d7ff00fd91c45633
Author: Andreas Plesner Jacobsen <apj at mutt.dk>
Date:   Mon Sep 5 20:09:59 2011 +0200

    Add documentation of string syntax, rollback, panic and synthetic keywords.
    
    Fixes: #991

diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst
index 4f005d0..82e20f4 100644
--- a/doc/sphinx/reference/vcl.rst
+++ b/doc/sphinx/reference/vcl.rst
@@ -39,6 +39,12 @@ In addition to the C-like assignment (=), comparison (==, !=) and
 boolean (!, && and \|\|) operators, VCL supports both regular
 expression and ACL matching using the ~ and the !~ operators.
 
+Basic strings are enclosed in " ... " and uses URL-style %-escapes.
+
+Long strings are enclosed in {" ... "} and do not have an escape
+character. They may contain any character including ", newline and
+other control characters except for the NUL (0x00) character.
+
 Unlike C and Perl, the backslash (\) character has no special meaning
 in strings in VCL, so it can be freely used in regular expressions
 without doubling.
@@ -55,6 +61,15 @@ You can use the *set* keyword to arbitrary HTTP headers. You can
 remove headers with the *remove* or *unset* keywords, which are
 synonym.
 
+You can use the *rollback* keyword to revert any changes to req at
+any time.
+
+The *synthetic* keyword is used to produce a synthetic response
+body in vcl_error. It takes a single string as argument.
+
+You can force a crash of the client process with the *panic* keyword.
+*panic* takes a string as argument.
+
 The ``return(action)`` keyword terminates the subroutine. *action* can be,
 depending on context one of
 



More information about the varnish-commit mailing list