r5690 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Wed Jan 5 15:27:59 CET 2011


Author: phk
Date: 2011-01-05 15:27:58 +0100 (Wed, 05 Jan 2011)
New Revision: 5690

Modified:
   trunk/varnish-cache/bin/varnishd/cache_center.c
Log:
Only set chunked mode if we actually want the body (ie: Not HEAD)



Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2011-01-05 14:11:50 UTC (rev 5689)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2011-01-05 14:27:58 UTC (rev 5690)
@@ -197,7 +197,9 @@
 			 * can make it any different size
 			 */
 			sp->wrk->res_mode |= RES_LEN;
-		else if (sp->http->protover >= 1.1) {
+		else if (!sp->wantbody) {
+			/* Nothing */
+		} else if (sp->http->protover >= 1.1) {
 			sp->wrk->res_mode |= RES_CHUNKED;
 		} else {
 			sp->wrk->res_mode |= RES_EOF;




More information about the varnish-commit mailing list