Commit 23de733b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

We used a wrong test to detect if a streaming pass could delete

object data, and therefore also deleted when we should not.

Fixes	#929
parent c117268c
......@@ -455,7 +455,8 @@ RES_StreamPoll(const struct sess *sp)
if (!(sp->wrk->res_mode & RES_GUNZIP))
(void)WRW_Flush(sp->wrk);
if (sp->objcore == NULL || (sp->objcore->flags & OC_F_PASS)) {
if (sp->obj->objcore == NULL ||
(sp->obj->objcore->flags & OC_F_PASS)) {
/*
* This is a pass object, release storage as soon as we
* have delivered it.
......
varnishtest "stream test"
server s1 {
rxreq
txresp -bodylen 400
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.do_stream = true;
}
} -start
client c1 {
txreq
rxresp
expect resp.bodylen == 400
txreq
rxresp
expect resp.bodylen == 400
} -run
......@@ -243,7 +243,8 @@ cmd_http_expect(CMD_ARGS)
vtc_log(hp->vl, 4, "EXPECT %s (%s) %s %s (%s) match",
av[0], lhs, av[1], av[2], rhs);
} else {
vtc_log(hp->vl, 0, "EXPECT %s (%s) %s %s (%s) not implemented",
vtc_log(hp->vl, 0,
"EXPECT %s (%s) %s %s (%s) test not implemented",
av[0], lhs, av[1], av[2], rhs);
}
}
......
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