Clear catflap when rolling back

Fixes #3752
parent 91f998e4
......@@ -235,6 +235,7 @@ Req_Rollback(VRT_CTX)
VCL_TaskEnter(req->top->privs);
HTTP_Clone(req->http, req->http0);
req->filter_list = NULL;
req->vcf = NULL;
if (WS_Overflowed(req->ws))
req->wrk->stats->ws_client_overflow++;
AN(req->ws_req);
......
......@@ -2,6 +2,7 @@ varnishtest "catflap"
varnish v1 -vcl {
import debug;
import std;
backend dummy { .host = "${bad_backend}"; }
......@@ -15,6 +16,11 @@ varnish v1 -vcl {
} else if (req.http.novcf) {
set req.http.consume = "some workspace";
return (pass);
} else if (req.http.rollback) {
debug.catflap(first);
std.rollback(req);
set req.http.consume = "some workspace";
set req.http.consume = "some workspace";
} else {
return (fail);
}
......@@ -71,6 +77,10 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.http.id == "3"
txreq -hdr "rollback: yes"
rxresp
expect resp.status == 200
expect resp.http.id == "3"
txreq -hdr "novcf: yes"
rxresp
expect resp.status == 206
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment