Commit 48d13a0e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Take another stab at #487 by explicitly resetting the worker thread

workspace before we start using it in miss/pass/pipe.  



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4076 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 97b7b326
......@@ -97,7 +97,6 @@ cnt_again(struct sess *sp)
AZ(sp->obj);
assert(sp->xid == 0);
WS_Reset(sp->wrk->ws, NULL);
i = HTC_Complete(sp->htc);
while (i == 0)
i = HTC_Rx(sp->htc);
......@@ -816,6 +815,7 @@ cnt_miss(struct sess *sp)
AZ(sp->obj);
AN(sp->objcore);
AN(sp->objhead);
WS_Reset(sp->wrk->ws, NULL);
sp->wrk->bereq = &sp->wrk->http[0];
http_Setup(sp->wrk->bereq, sp->wrk->ws);
http_FilterHeader(sp, HTTPH_R_FETCH);
......@@ -880,6 +880,7 @@ cnt_pass(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
AZ(sp->obj);
WS_Reset(sp->wrk->ws, NULL);
sp->wrk->bereq = &sp->wrk->http[0];
http_Setup(sp->wrk->bereq, sp->wrk->ws);
http_FilterHeader(sp, HTTPH_R_PASS);
......@@ -929,6 +930,7 @@ cnt_pipe(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
sp->acct_req.pipe++;
WS_Reset(sp->wrk->ws, NULL);
sp->wrk->bereq = &sp->wrk->http[0];
http_Setup(sp->wrk->bereq, sp->wrk->ws);
http_FilterHeader(sp, HTTPH_R_PIPE);
......
......@@ -760,7 +760,7 @@ ESI_Deliver(struct sess *sp)
struct esi_bit *eb;
struct object *obj;
struct worker *w;
char *ws_wm, *wws_wm;
char *ws_wm;
struct http http_save;
w = sp->wrk;
......@@ -797,7 +797,6 @@ ESI_Deliver(struct sess *sp)
/* Take a workspace snapshot */
ws_wm = WS_Snapshot(sp->ws);
wws_wm = WS_Snapshot(sp->wrk->ws);
http_SetH(sp->http, HTTP_HDR_URL, eb->include.b);
if (eb->host.b != NULL) {
......@@ -838,7 +837,6 @@ ESI_Deliver(struct sess *sp)
/* Reset the workspace */
WS_Reset(sp->ws, ws_wm);
WS_Reset(sp->wrk->ws, wws_wm);
WRW_Reserve(sp->wrk, &sp->fd);
if (sp->fd < 0)
......
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