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
a4d1d5d2
Commit
a4d1d5d2
authored
Mar 17, 2014
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small example on how to do synthetic responses
parent
793d67ad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
upgrading.rst
doc/sphinx/whats-new/upgrading.rst
+18
-0
No files found.
doc/sphinx/whats-new/upgrading.rst
View file @
a4d1d5d2
...
...
@@ -41,6 +41,24 @@ You must now explicitly return an error::
return(error(999, "Response));
Synthetic responses in vcl_error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Setting headers on synthetic response bodies made in vcl_error are now done on
resp.http instead of obj.http.
The synthetic keyword is now a function::
if (resp.status == 799) {
set resp.status = 200;
set resp.http.Content-Type = "text/plain; charset=utf-8";
synthetic({"You are "} + client.ip);
return (deliver);
}
hit_for_pass objects are created using beresp.uncacheable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Example::
...
...
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