Commit 3b1f918e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Introduce the control variable for streaming.

parent 259d869d
...@@ -303,6 +303,7 @@ struct worker { ...@@ -303,6 +303,7 @@ struct worker {
struct vfp *vfp; struct vfp *vfp;
struct vgz *vgz_rx; struct vgz *vgz_rx;
struct vef_priv *vef_priv; struct vef_priv *vef_priv;
unsigned do_stream;
unsigned do_esi; unsigned do_esi;
unsigned do_gzip; unsigned do_gzip;
unsigned is_gzip; unsigned is_gzip;
......
...@@ -664,6 +664,9 @@ cnt_fetchbody(struct sess *sp) ...@@ -664,6 +664,9 @@ cnt_fetchbody(struct sess *sp)
else if (sp->wrk->is_gzip) else if (sp->wrk->is_gzip)
sp->wrk->vfp = &vfp_testgzip; sp->wrk->vfp = &vfp_testgzip;
if (sp->wrk->do_esi)
sp->wrk->do_stream = 0;
l = http_EstimateWS(sp->wrk->beresp, l = http_EstimateWS(sp->wrk->beresp,
pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp); pass ? HTTPH_R_PASS : HTTPH_A_INS, &nhttp);
...@@ -1177,10 +1180,12 @@ cnt_recv(struct sess *sp) ...@@ -1177,10 +1180,12 @@ cnt_recv(struct sess *sp)
return (0); return (0);
} }
/* XXX: do_esi ? */
sp->wrk->is_gzip = 0; sp->wrk->is_gzip = 0;
sp->wrk->is_gunzip = 0; sp->wrk->is_gunzip = 0;
sp->wrk->do_gzip = 0; sp->wrk->do_gzip = 0;
sp->wrk->do_gunzip = 0; sp->wrk->do_gunzip = 0;
sp->wrk->do_stream = 0;
if (params->http_gzip_support && if (params->http_gzip_support &&
(recv_handling != VCL_RET_PIPE) && (recv_handling != VCL_RET_PIPE) &&
......
...@@ -197,6 +197,7 @@ VRT_r_##dir##_##onm(const struct sess *sp) \ ...@@ -197,6 +197,7 @@ VRT_r_##dir##_##onm(const struct sess *sp) \
VBERESP(beresp, unsigned, do_esi, do_esi) VBERESP(beresp, unsigned, do_esi, do_esi)
VBERESP(beresp, unsigned, do_gzip, do_gzip) VBERESP(beresp, unsigned, do_gzip, do_gzip)
VBERESP(beresp, unsigned, do_gunzip, do_gunzip) VBERESP(beresp, unsigned, do_gunzip, do_gunzip)
VBERESP(beresp, unsigned, do_stream, do_stream)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
......
...@@ -310,6 +310,12 @@ sp_variables = ( ...@@ -310,6 +310,12 @@ sp_variables = (
( 'fetch',), ( 'fetch',),
'const struct sess *' 'const struct sess *'
), ),
('beresp.do_stream',
'BOOL',
( 'miss', 'pass', 'fetch',),
( 'miss', 'pass', 'fetch',),
'const struct sess *'
),
('beresp.do_gzip', ('beresp.do_gzip',
'BOOL', 'BOOL',
( 'fetch',), ( 'fetch',),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment