Commit 6e493502 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Tighten up the management of the do_close flag.

Fixes	#890
parent a36d77c3
......@@ -488,7 +488,6 @@ cnt_fetch(struct sess *sp)
if (i) {
sp->handling = VCL_RET_ERROR;
sp->err_code = 503;
sp->wrk->do_close = 0;
} else {
/*
* These two headers can be spread over multiple actual headers
......@@ -541,6 +540,7 @@ cnt_fetch(struct sess *sp)
}
/* Clean up partial fetch */
AZ(sp->vbc);
if (sp->objcore != NULL) {
CHECK_OBJ_NOTNULL(sp->objcore, OBJCORE_MAGIC);
......@@ -729,7 +729,6 @@ cnt_fetchbody(struct sess *sp)
/* Use unmodified headers*/
i = FetchBody(sp);
sp->wrk->do_close = 0;
sp->wrk->h_content_length = NULL;
http_Setup(sp->wrk->bereq, NULL);
......
......@@ -62,6 +62,7 @@ VDI_CloseFd(struct sess *sp)
sp->vbc->backend = NULL;
VBE_ReleaseConn(sp->vbc);
sp->vbc = NULL;
sp->wrk->do_close = 0;
}
/* Recycle a connection ----------------------------------------------*/
......@@ -74,6 +75,7 @@ VDI_RecycleFd(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->vbc, VBC_MAGIC);
CHECK_OBJ_NOTNULL(sp->vbc->backend, BACKEND_MAGIC);
assert(sp->vbc->fd >= 0);
AZ(sp->wrk->do_close);
bp = sp->vbc->backend;
......
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