Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
db1a21ff
Commit
db1a21ff
authored
Sep 05, 2011
by
Andreas Plesner Jacobsen
Committed by
Andreas Plesner Jacobsen
Sep 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add documentation of string syntax, rollback, panic and synthetic keywords.
Fixes: #991
parent
dce01d1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
vcl.rst
doc/sphinx/reference/vcl.rst
+15
-0
No files found.
doc/sphinx/reference/vcl.rst
View file @
db1a21ff
...
@@ -39,6 +39,12 @@ In addition to the C-like assignment (=), comparison (==, !=) and
...
@@ -39,6 +39,12 @@ In addition to the C-like assignment (=), comparison (==, !=) and
boolean (!, && and \|\|) operators, VCL supports both regular
boolean (!, && and \|\|) operators, VCL supports both regular
expression and ACL matching using the ~ and the !~ operators.
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
Unlike C and Perl, the backslash (\) character has no special meaning
in strings in VCL, so it can be freely used in regular expressions
in strings in VCL, so it can be freely used in regular expressions
without doubling.
without doubling.
...
@@ -55,6 +61,15 @@ You can use the *set* keyword to arbitrary HTTP headers. You can
...
@@ -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
remove headers with the *remove* or *unset* keywords, which are
synonym.
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,
The ``return(action)`` keyword terminates the subroutine. *action* can be,
depending on context one of
depending on context one of
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment