Commit 6f7c8a77 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

restart in vcl_deliver{} would crash in vcl_fetch{} due to missing cleanup.

Found & Fixed by:	Martin

Fixes	#979
parent 0006ddd1
......@@ -233,6 +233,7 @@ cnt_prepresp(struct sess *sp)
AZ(sp->obj);
sp->restarts++;
sp->director = NULL;
sp->wrk->h_content_length = NULL;
http_Setup(sp->wrk->bereq, NULL);
http_Setup(sp->wrk->beresp, NULL);
http_Setup(sp->wrk->resp, NULL);
......
varnishtest "r00979.vtc Test restart when do_stream in vcl_deliver"
server s1 {
rxreq
txresp -status 200 -body "1"
expect_close
accept
rxreq
txresp -status 200 -body "11"
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.do_stream = true;
}
sub vcl_deliver {
if (req.restarts == 0) {
return (restart);
}
}
} -start
client c1 {
txreq
rxresp
expect resp.status == 200
expect resp.bodylen == 2
} -run
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