Commit 8c821b77 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Don't consider pass an error when doing streaming fetch.

Patch by: tnt
parent 82c4b095
......@@ -930,13 +930,13 @@ cnt_streambody(struct sess *sp)
AZ(sp->vbc);
AN(sp->director);
if (!i && sp->obj->objcore != NULL) {
if (i)
sp->doclose = "Stream error";
else if (sp->obj->objcore != NULL) {
EXP_Insert(sp->obj);
AN(sp->obj->objcore);
AN(sp->obj->objcore->ban);
HSH_Unbusy(sp);
} else {
sp->doclose = "Stream error";
}
sp->wrk->acct_tmp.fetch++;
sp->director = NULL;
......
varnishtest "#1157 - Connection close on pass and do_stream"
server s1 {
rxreq
txresp
expect req.url == "/"
rxreq
txresp
expect req.url == "/"
} -start
varnish v1 -vcl+backend {
sub vcl_recv { return (pass); }
sub vcl_fetch { set beresp.do_stream = true; }
} -start
client c1 {
txreq -url /
rxresp
expect resp.status == 200
txreq -url /
rxresp
expect resp.status == 200
} -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