Commit 7a8492bf authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Tollef Fog Heen

Don't panic if we can both do conditional (IMS) and stream,

prefer IMS, it is less work and less data to transmit.

Fixes	#972

Thanks to:	Martin
parent 93686f85
......@@ -800,6 +800,16 @@ cnt_fetchbody(struct sess *sp)
assert(WRW_IsReleased(sp->wrk));
/*
* If we can deliver a 304 reply, we don't bother streaming.
* Notice that vcl_deliver{} could still nuke the headers
* that allow the 304, in which case we return 200 non-stream.
*/
if (sp->obj->response == 200 &&
sp->http->conds &&
RFC2616_Do_Cond(sp))
sp->wrk->do_stream = 0;
if (sp->wrk->do_stream) {
sp->step = STP_PREPRESP;
return (0);
......
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