Commit 8c534e25 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Be much more bombastic about the per-request flags.

This highlights that they really need to go into a struct or
bitmap for clarity, but I'm not doing that right before 3.0.1

Fixes	#986

Many Thanks To:	Kristian
parent cd6b2b86
......@@ -310,6 +310,13 @@ cnt_done(struct sess *sp)
sp->director = NULL;
sp->restarts = 0;
sp->wrk->do_esi = 0;
sp->wrk->do_gunzip = 0;
sp->wrk->do_gzip = 0;
sp->wrk->do_stream = 0;
sp->wrk->is_gunzip = 0;
sp->wrk->is_gzip = 0;
if (sp->vcl != NULL && sp->esi_level == 0) {
if (sp->wrk->vcl != NULL)
VCL_Rel(&sp->wrk->vcl);
......@@ -417,6 +424,13 @@ cnt_error(struct sess *sp)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
sp->wrk->do_esi = 0;
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;
w = sp->wrk;
if (sp->obj == NULL) {
HSH_Prealloc(sp);
......@@ -572,7 +586,7 @@ cnt_fetch(struct sess *sp)
if (sp->objcore == NULL)
sp->wrk->exp.ttl = -1.;
sp->wrk->do_esi = 0;
AZ(sp->wrk->do_esi);
VCL_fetch_method(sp);
......@@ -988,6 +1002,8 @@ cnt_hit(struct sess *sp)
assert(!(sp->obj->objcore->flags & OC_F_PASS));
AZ(sp->wrk->do_stream);
VCL_hit_method(sp);
if (sp->handling == VCL_RET_DELIVER) {
......@@ -1360,7 +1376,8 @@ cnt_recv(struct sess *sp)
return (0);
}
/* XXX: do_esi ? */
/* Zap these, in case we came here through restart */
sp->wrk->do_esi = 0;
sp->wrk->is_gzip = 0;
sp->wrk->is_gunzip = 0;
sp->wrk->do_gzip = 0;
......@@ -1541,6 +1558,13 @@ CNT_Session(struct sess *sp)
sp->step == STP_LOOKUP ||
sp->step == STP_RECV);
AZ(w->do_stream);
AZ(w->is_gzip);
AZ(w->do_gzip);
AZ(w->is_gunzip);
AZ(w->do_gunzip);
AZ(w->do_esi);
/*
* Whenever we come in from the acceptor we need to set blocking
* mode, but there is no point in setting it when we come from
......@@ -1582,6 +1606,12 @@ CNT_Session(struct sess *sp)
CHECK_OBJ_ORNULL(w->nobjhead, OBJHEAD_MAGIC);
}
WSL_Flush(w, 0);
AZ(w->do_stream);
AZ(w->is_gzip);
AZ(w->do_gzip);
AZ(w->is_gunzip);
AZ(w->do_gunzip);
AZ(w->do_esi);
assert(WRW_IsReleased(w));
}
......
......@@ -90,6 +90,13 @@ ved_include(struct sess *sp, const char *src, const char *host)
/* Client content already taken care of */
http_Unset(sp->http, H_Content_Length);
sp->wrk->do_esi = 0;
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;
sxid = sp->xid;
while (1) {
sp->wrk = w;
......
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