[4.0] 9c75071 Add a debug facility to force a WRW_Flush after the headers.

Martin Blix Grydeland martin at varnish-software.com
Fri Nov 7 14:17:23 CET 2014


commit 9c7507131f67dfbee919b58caf6f3217263bbf0b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Oct 30 15:30:12 2014 +0000

    Add a debug facility to force a WRW_Flush after the headers.
    
    Conflicts:
    	bin/varnishd/cache/cache_http1_deliver.c

diff --git a/bin/varnishd/cache/cache_http1_deliver.c b/bin/varnishd/cache/cache_http1_deliver.c
index 9b0d51b..3779238 100644
--- a/bin/varnishd/cache/cache_http1_deliver.c
+++ b/bin/varnishd/cache/cache_http1_deliver.c
@@ -329,6 +329,9 @@ V1D_Deliver(struct req *req, struct busyobj *bo)
 	if (!(req->res_mode & RES_ESI_CHILD))
 		req->resp_hdrbytes +=
 		    HTTP1_Write(req->wrk, req->resp, HTTP1_Resp);
+	if (DO_DEBUG(DBG_FLUSH_HEAD)) {
+		(void)WRW_Flush(req->wrk);
+	}
 
 	if (req->res_mode & RES_CHUNKED)
 		WRW_Chunked(req->wrk);
@@ -440,6 +443,9 @@ V1D_Deliver_Synth(struct req *req)
 	if (!(req->res_mode & RES_ESI_CHILD))
 		req->resp_hdrbytes +=
 		    HTTP1_Write(req->wrk, req->resp, HTTP1_Resp);
+	if (DO_DEBUG(DBG_FLUSH_HEAD)) {
+		(void)WRW_Flush(req->wrk);
+	}
 
 	if (req->res_mode & RES_CHUNKED)
 		WRW_Chunked(req->wrk);
diff --git a/include/tbl/debug_bits.h b/include/tbl/debug_bits.h
index 59bc64e..81d5e38 100644
--- a/include/tbl/debug_bits.h
+++ b/include/tbl/debug_bits.h
@@ -38,3 +38,4 @@ DEBUG_BIT(HASHEDGE,		hashedge,	"Edge cases in Hash")
 DEBUG_BIT(VCLREL,		vclrel,		"Rapid VCL release")
 DEBUG_BIT(LURKER,		lurker,		"VSL Ban lurker")
 DEBUG_BIT(ESI_CHOP,		esi_chop,	"Chop ESI fetch to bits")
+DEBUG_BIT(FLUSH_HEAD,		flush_head,	"Flush after http1 head")



More information about the varnish-commit mailing list