Commit 71f81608 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use the busyobj workspace for random VCL work in vcl_backend_*{}

Minor polish
parent c395b650
......@@ -417,7 +417,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
AZ(bo->do_pass);
VCL_backend_response_method(req->vcl, wrk, req, NULL,
req->http->ws);
bo->beresp->ws);
if (bo->do_pass)
req->objcore->flags |= OC_F_PASS;
......@@ -924,7 +924,7 @@ cnt_miss(struct worker *wrk, struct req *req)
http_SetHeader(bo->bereq, "Accept-Encoding: gzip");
}
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, req->http->ws);
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, bo->bereq->ws);
VCL_miss_method(req->vcl, wrk, req, NULL, req->http->ws);
if (wrk->handling == VCL_RET_FETCH) {
......@@ -989,7 +989,7 @@ cnt_pass(struct worker *wrk, struct req *req)
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq);
http_FilterReq(req, HTTPH_R_PASS);
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, req->http->ws);
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, bo->bereq->ws);
VCL_pass_method(req->vcl, wrk, req, NULL, req->http->ws);
if (wrk->handling == VCL_RET_ERROR) {
......
......@@ -355,7 +355,12 @@ ccf_config_use(struct cli *cli, const char * const *av, void *priv)
VBE_UseHealth(vcl->conf->director[i]);
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------
* Method functions to call into VCL programs.
*
* Either the request or busyobject must be specified, but not both.
* The workspace argument is where random VCL stuff gets space from.
*/
static void
vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
......@@ -391,6 +396,7 @@ VCL_##func##_method(struct VCL_conf *vcl, struct worker *wrk, \
struct req *req, struct busyobj *bo, struct ws *ws) \
{ \
\
CHECK_OBJ_NOTNULL(vcl, VCL_CONF_MAGIC); \
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); \
vcl_call_method(wrk, req, bo, ws, VCL_MET_ ## upper, \
vcl->func##_func); \
......
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