Commit d1bb1136 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix ESI documents with multiple includes.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2616 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 16c5a2d0
......@@ -169,6 +169,12 @@ cnt_deliver(struct sess *sp)
INCOMPL();
}
sp->director = NULL;
sp->backend = NULL; /*
* XXX: we may want to leave this
* behind to hint directors ?
*/
RES_WriteObj(sp);
HSH_Deref(sp->obj);
sp->obj = NULL;
......@@ -204,7 +210,7 @@ cnt_done(struct sess *sp)
* behind to hint directors ?
*/
if (sp->vcl != NULL) {
if (sp->vcl != NULL && sp->esis == 0) {
if (sp->wrk->vcl != NULL)
VCL_Rel(&sp->wrk->vcl);
sp->wrk->vcl = sp->vcl;
......@@ -774,6 +780,11 @@ cnt_recv(struct sess *sp)
CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
AZ(sp->obj);
/* By default we use the first backend */
AZ(sp->director);
sp->director = sp->vcl->director[0];
CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
VCL_recv_method(sp);
sp->wantbody = (strcmp(sp->http->hd[HTTP_HDR_REQ].b, "HEAD") != 0);
......@@ -854,11 +865,6 @@ cnt_start(struct sess *sp)
sp->doclose = http_DoConnection(sp->http);
/* By default we use the first backend */
AZ(sp->director);
sp->director = sp->vcl->director[0];
CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
/* XXX: Handle TRACE & OPTIONS of Max-Forwards = 0 */
sp->step = STP_RECV;
......
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