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

Setup the VFP already when we have fetched the headers.

parent 4fc2d87f
......@@ -242,20 +242,6 @@ vbe_dir_gethdrs(const struct director *d, struct worker *wrk,
return (-1);
}
static int __match_proto__(vdi_getbody_f)
vbe_dir_getbody(const struct director *d, struct worker *wrk,
struct busyobj *bo)
{
CHECK_OBJ_NOTNULL(d, DIRECTOR_MAGIC);
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
CHECK_OBJ_NOTNULL(bo->vfc, VFP_CTX_MAGIC);
CHECK_OBJ_NOTNULL(bo->htc, HTTP_CONN_MAGIC);
return (V1F_Setup_Fetch(bo->vfc, bo->htc));
}
static const struct suckaddr * __match_proto__(vdi_getip_f)
vbe_dir_getip(const struct director *d, struct worker *wrk,
struct busyobj *bo)
......@@ -355,7 +341,6 @@ VBE_fill_director(struct backend *be)
d->http1pipe = vbe_dir_http1pipe;
d->healthy = vbe_dir_healthy;
d->gethdrs = vbe_dir_gethdrs;
d->getbody = vbe_dir_getbody;
d->getip = vbe_dir_getip;
d->finish = vbe_dir_finish;
d->panic = vbe_panic;
......
......@@ -203,5 +203,10 @@ V1F_FetchRespHdr(struct busyobj *bo)
htc->doclose = http_DoConnection(hp);
RFC2616_Response_Body(bo->wrk, bo);
bo->vfc->http = bo->beresp;
if (bo->htc->body_status != BS_NONE &&
bo->htc->body_status != BS_ERROR)
(void)V1F_Setup_Fetch(bo->vfc, bo->htc);
return (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