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
b211dd2e
Commit
b211dd2e
authored
Feb 22, 2016
by
Federico G. Schwindt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retire rollback
This has been available via the std module for some time now. OK'd by phk@.
parent
d9e27bda
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
57 deletions
+2
-57
c00032.vtc
bin/varnishtest/tests/c00032.vtc
+0
-35
r01168.vtc
bin/varnishtest/tests/r01168.vtc
+2
-1
v00018.vtc
bin/varnishtest/tests/v00018.vtc
+0
-6
vcl.rst
doc/sphinx/reference/vcl.rst
+0
-4
vcc_action.c
lib/libvcc/vcc_action.c
+0
-11
No files found.
bin/varnishtest/tests/c00032.vtc
deleted
100644 → 0
View file @
d9e27bda
varnishtest "Test Rollback"
server s1 {
rxreq
expect req.url == "/foo"
expect req.http.foobar == "harck-coff"
txresp -status 400
accept
rxreq
expect req.url == "/bar"
expect req.http.foobar == "snark"
txresp -bodylen 5
} -start
varnish v1 -vcl+backend {
sub vcl_recv {
if (req.url == "/foo") {
set req.http.foobar = "harck-coff";
}
}
sub vcl_deliver {
if (resp.status == 400) {
rollback;
set req.url = "/bar";
return (restart);
}
}
} -start
client c1 {
txreq -url "/foo" -hdr "foobar: snark"
rxresp
} -run
bin/varnishtest/tests/r01168.vtc
View file @
b211dd2e
...
@@ -11,8 +11,9 @@ server s1 {
...
@@ -11,8 +11,9 @@ server s1 {
} -start
} -start
varnish v1 -vcl+backend {
varnish v1 -vcl+backend {
import std;
sub vcl_recv {
sub vcl_recv {
rollback
;
std.rollback(req)
;
}
}
sub vcl_backend_response {
sub vcl_backend_response {
set beresp.do_esi = true;
set beresp.do_esi = true;
...
...
bin/varnishtest/tests/v00018.vtc
View file @
b211dd2e
varnishtest "VCL compiler coverage test: vcc_action.c"
varnishtest "VCL compiler coverage test: vcc_action.c"
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_hit { return (restart) ; }
sub vcl_miss { rollback; return (restart); }
}
varnish v1 -vcl {
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
backend b { .host = "127.0.0.1"; }
sub vcl_miss { return(synth(100,req.url)); }
sub vcl_miss { return(synth(100,req.url)); }
...
...
doc/sphinx/reference/vcl.rst
View file @
b211dd2e
...
@@ -378,10 +378,6 @@ hash_data(input)
...
@@ -378,10 +378,6 @@ hash_data(input)
Adds an input to the hash input. In the built-in VCL hash_data()
Adds an input to the hash input. In the built-in VCL hash_data()
is called on the host and URL of the *request*. Available in vcl_hash.
is called on the host and URL of the *request*. Available in vcl_hash.
rollback()
Restore *req* HTTP headers to their original state. This function is
deprecated. Use std.rollback() instead.
synthetic(STRING)
synthetic(STRING)
Prepare a synthetic response body containing the STRING. Available in
Prepare a synthetic response body containing the STRING. Available in
vcl_synth and vcl_backend_error.
vcl_synth and vcl_backend_error.
...
...
lib/libvcc/vcc_action.c
View file @
b211dd2e
...
@@ -375,16 +375,6 @@ parse_return(struct vcc *tl)
...
@@ -375,16 +375,6 @@ parse_return(struct vcc *tl)
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
static
void
parse_rollback
(
struct
vcc
*
tl
)
{
vcc_NextToken
(
tl
);
Fb
(
tl
,
1
,
"VRT_Rollback(ctx, VRT_r_req(ctx));
\n
"
);
}
/*--------------------------------------------------------------------*/
static
void
static
void
parse_synthetic
(
struct
vcc
*
tl
)
parse_synthetic
(
struct
vcc
*
tl
)
{
{
...
@@ -419,7 +409,6 @@ static struct action_table {
...
@@ -419,7 +409,6 @@ static struct action_table {
{
"hash_data"
,
parse_hash_data
,
VCL_MET_HASH
},
{
"hash_data"
,
parse_hash_data
,
VCL_MET_HASH
},
{
"new"
,
parse_new
,
VCL_MET_INIT
},
{
"new"
,
parse_new
,
VCL_MET_INIT
},
{
"return"
,
parse_return
},
{
"return"
,
parse_return
},
{
"rollback"
,
parse_rollback
},
{
"set"
,
parse_set
},
{
"set"
,
parse_set
},
{
"synthetic"
,
parse_synthetic
,
{
"synthetic"
,
parse_synthetic
,
VCL_MET_SYNTH
|
VCL_MET_BACKEND_ERROR
},
VCL_MET_SYNTH
|
VCL_MET_BACKEND_ERROR
},
...
...
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