[PATCH 06/25] Don't try to stream when there is no body.
Martin Blix Grydeland
martin at varnish-software.com
Sun Jan 22 18:53:12 CET 2012
---
bin/varnishd/cache/cache_center.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index f074c4b..55e06c6 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -811,6 +811,10 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
if (!req->wantbody)
wrk->busyobj->do_stream = 0;
+ /* No reason to try streaming a non-existing body */
+ if (wrk->busyobj->body_status == BS_NONE)
+ wrk->busyobj->do_stream = 0;
+
l = http_EstimateWS(wrk->busyobj->beresp,
pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp);
--
1.7.4.1
More information about the varnish-dev
mailing list