Hello,

First of all thank you Geoff for updating the experimental-ims branch
yesterday!

After some tests, I found out that there was a problem using streaming
(do_stream = true) with conditional backend request.

Here's a small patch that fixes the bug :-)

Best,

--
Jocelyn De La Rosa
Smartjog - Developer - Research&  Engineering


>From 8ac021dcecc47e60351e54cf81b436f69dca128a Mon Sep 17 00:00:00 2001
From: Jocelyn De La Rosa <[email protected]>
Date: Tue, 10 Jan 2012 15:56:48 +0100
Subject: [PATCH] Fix conditional backend request in streaming mode

---
 bin/varnishd/cache/cache_center.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/bin/varnishd/cache/cache_center.c b/bin/varnishd/cache/cache_center.c
index 1883943..04a2444 100644
--- a/bin/varnishd/cache/cache_center.c
+++ b/bin/varnishd/cache/cache_center.c
@@ -896,8 +896,10 @@ cnt_fetchbody(struct sess *sp, struct worker *wrk, struct req *req)
          */
         if (sp->stale_obj) {
             http_Check304(sp);
-            if (wrk->busyobj->beresp->status == 304)
+            if (wrk->busyobj->beresp->status == 304) {
                 assert(req->obj->http->status == 200);
+		wrk->busyobj->do_stream = 0;
+	    }
 	    EXP_Clr(&sp->stale_obj->exp);
 	    EXP_Rearm(sp->stale_obj);
 	    HSH_Deref(sp->wrk, NULL, &sp->stale_obj);
-- 
1.7.2.5

_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to