[3.0] b1d132c Don't try to stream when there is no body.

Tollef Fog Heen tfheen at varnish-cache.org
Thu May 24 14:51:10 CEST 2012


commit b1d132c5e22ad37da0fc7c642373417052bbbe94
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Wed May 23 13:28:30 2012 +0200

    Don't try to stream when there is no body.

diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index b3d7237..b2b9a45 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -747,6 +747,10 @@ cnt_fetchbody(struct sess *sp)
 	if (!sp->wantbody)
 		sp->wrk->do_stream = 0;
 
+	/* No reason to try streaming a non-existing body */
+	if (sp->wrk->body_status == BS_NONE)
+		sp->wrk->do_stream = 0;
+
 	l = http_EstimateWS(sp->wrk->beresp,
 	    pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp);
 



More information about the varnish-commit mailing list