Commit 8410629b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Have calls to VCL methods provide bo, rather than derive it magically

from req.
parent f821a2f7
...@@ -416,7 +416,7 @@ cnt_fetch(struct worker *wrk, struct req *req) ...@@ -416,7 +416,7 @@ cnt_fetch(struct worker *wrk, struct req *req)
AZ(bo->do_esi); AZ(bo->do_esi);
AZ(bo->do_pass); AZ(bo->do_pass);
VCL_backend_response_method(req->vcl, wrk, req, NULL, VCL_backend_response_method(bo->vcl, wrk, req, bo,
bo->beresp->ws); bo->beresp->ws);
if (bo->do_pass) if (bo->do_pass)
...@@ -924,7 +924,7 @@ cnt_miss(struct worker *wrk, struct req *req) ...@@ -924,7 +924,7 @@ cnt_miss(struct worker *wrk, struct req *req)
http_SetHeader(bo->bereq, "Accept-Encoding: gzip"); http_SetHeader(bo->bereq, "Accept-Encoding: gzip");
} }
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, bo->bereq->ws); VCL_backend_fetch_method(bo->vcl, wrk, req, bo, bo->bereq->ws);
VCL_miss_method(req->vcl, wrk, req, NULL, req->http->ws); VCL_miss_method(req->vcl, wrk, req, NULL, req->http->ws);
if (wrk->handling == VCL_RET_FETCH) { if (wrk->handling == VCL_RET_FETCH) {
...@@ -989,8 +989,8 @@ cnt_pass(struct worker *wrk, struct req *req) ...@@ -989,8 +989,8 @@ cnt_pass(struct worker *wrk, struct req *req)
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq); HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq);
http_FilterReq(req, HTTPH_R_PASS); http_FilterReq(req, HTTPH_R_PASS);
VCL_backend_fetch_method(req->vcl, wrk, req, NULL, bo->bereq->ws); VCL_backend_fetch_method(bo->vcl, wrk, req, bo, bo->bereq->ws);
VCL_pass_method(req->vcl, wrk, req, NULL, req->http->ws); VCL_pass_method(bo->vcl, wrk, req, bo, bo->bereq->ws);
if (wrk->handling == VCL_RET_ERROR) { if (wrk->handling == VCL_RET_ERROR) {
http_Teardown(bo->bereq); http_Teardown(bo->bereq);
......
...@@ -391,7 +391,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo, ...@@ -391,7 +391,7 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
memset(&ctx, 0, sizeof ctx); memset(&ctx, 0, sizeof ctx);
ctx.magic = VRT_CTX_MAGIC; ctx.magic = VRT_CTX_MAGIC;
if (req != NULL) { if (req != NULL) {
AZ(bo); // AZ(bo);
CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(req->sp, SESS_MAGIC);
vsl = req->vsl; vsl = req->vsl;
...@@ -403,16 +403,6 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo, ...@@ -403,16 +403,6 @@ vcl_call_method(struct worker *wrk, struct req *req, struct busyobj *bo,
if (req->obj) if (req->obj)
ctx.http_obj = req->obj->http; ctx.http_obj = req->obj->http;
} }
if (method == VCL_MET_BACKEND_FETCH ||
method == VCL_MET_PASS ||
method == VCL_MET_MISS ||
method == VCL_MET_PIPE ||
method == VCL_MET_BACKEND_RESPONSE) {
/* XXX: temporary workaround */
AN(req);
bo = req->busyobj;
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
}
if (bo != NULL) { if (bo != NULL) {
// AZ(req); // AZ(req);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
......
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