[master] 3b1f918 Introduce the control variable for streaming.

Poul-Henning Kamp phk at varnish-cache.org
Mon Apr 11 10:32:03 CEST 2011


commit 3b1f918e29d06aed9bec1e1be765fb18d4baf8f3
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Apr 11 07:00:48 2011 +0000

    Introduce the control variable for streaming.

diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h
index 4bc7309..95a8dbf 100644
--- a/bin/varnishd/cache.h
+++ b/bin/varnishd/cache.h
@@ -303,6 +303,7 @@ struct worker {
 	struct vfp		*vfp;
 	struct vgz		*vgz_rx;
 	struct vef_priv		*vef_priv;
+	unsigned		do_stream;
 	unsigned		do_esi;
 	unsigned		do_gzip;
 	unsigned		is_gzip;
diff --git a/bin/varnishd/cache_center.c b/bin/varnishd/cache_center.c
index ba418b6..fb65242 100644
--- a/bin/varnishd/cache_center.c
+++ b/bin/varnishd/cache_center.c
@@ -664,6 +664,9 @@ cnt_fetchbody(struct sess *sp)
 	else if (sp->wrk->is_gzip)
 		sp->wrk->vfp = &vfp_testgzip;
 
+	if (sp->wrk->do_esi)
+		sp->wrk->do_stream = 0;
+
 	l = http_EstimateWS(sp->wrk->beresp,
 	    pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp);
 
@@ -1177,10 +1180,12 @@ cnt_recv(struct sess *sp)
 		return (0);
 	}
 
+	/* XXX: do_esi ? */
 	sp->wrk->is_gzip = 0;
 	sp->wrk->is_gunzip = 0;
 	sp->wrk->do_gzip = 0;
 	sp->wrk->do_gunzip = 0;
+	sp->wrk->do_stream = 0;
 
 	if (params->http_gzip_support &&
 	     (recv_handling != VCL_RET_PIPE) &&
diff --git a/bin/varnishd/cache_vrt_var.c b/bin/varnishd/cache_vrt_var.c
index 8faf2c4..b9b99a9 100644
--- a/bin/varnishd/cache_vrt_var.c
+++ b/bin/varnishd/cache_vrt_var.c
@@ -197,6 +197,7 @@ VRT_r_##dir##_##onm(const struct sess *sp)				\
 VBERESP(beresp, unsigned, do_esi, do_esi)
 VBERESP(beresp, unsigned, do_gzip, do_gzip)
 VBERESP(beresp, unsigned, do_gunzip, do_gunzip)
+VBERESP(beresp, unsigned, do_stream, do_stream)
 
 /*--------------------------------------------------------------------*/
 
diff --git a/lib/libvcl/generate.py b/lib/libvcl/generate.py
index 969fbc8..b9e1cc3 100755
--- a/lib/libvcl/generate.py
+++ b/lib/libvcl/generate.py
@@ -310,6 +310,12 @@ sp_variables = (
 		( 'fetch',),
 		'const struct sess *'
 	),
+	('beresp.do_stream',
+		'BOOL',
+		( 'miss', 'pass', 'fetch',),
+		( 'miss', 'pass', 'fetch',),
+		'const struct sess *'
+	),
 	('beresp.do_gzip',
 		'BOOL',
 		( 'fetch',),



More information about the varnish-commit mailing list