Commit 42fb7e96 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move req's vfp_ctx into struct req

parent 95437e6c
......@@ -227,7 +227,6 @@ struct http_conn {
char *pipeline_b;
char *pipeline_e;
ssize_t content_length;
struct vfp_ctx vfc[1];
void *priv;
/* Timeouts */
......@@ -567,6 +566,7 @@ struct req {
double t_req; /* Headers complete */
struct http_conn htc[1];
struct vfp_ctx vfc[1];
const char *client_identity;
/* HTTP request */
......
......@@ -57,8 +57,8 @@ vrb_pull(struct req *req, ssize_t maxsize, objiterate_f *func, void *priv)
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->htc, HTTP_CONN_MAGIC);
CHECK_OBJ_NOTNULL(req->htc->vfc, VFP_CTX_MAGIC);
vfc = req->htc->vfc;
CHECK_OBJ_NOTNULL(req->vfc, VFP_CTX_MAGIC);
vfc = req->vfc;
req->body_oc = HSH_Private(req->wrk);
AN(req->body_oc);
......@@ -291,8 +291,7 @@ VRB_Cache(struct req *req, ssize_t maxsize)
if (req->htc->content_length > maxsize) {
req->req_body_status = REQ_BODY_FAIL;
(void)VFP_Error(req->htc->vfc,
"Request body too big to cache");
(void)VFP_Error(req->vfc, "Request body too big to cache");
return (-1);
}
......
......@@ -678,9 +678,9 @@ cnt_recv(struct worker *wrk, struct req *req)
http_CollectHdr(req->http, H_Cache_Control);
VFP_Setup(req->htc->vfc);
req->htc->vfc->http = req->http;
req->htc->vfc->wrk = wrk;
VFP_Setup(req->vfc);
req->vfc->http = req->http;
req->vfc->wrk = wrk;
if (req->transport->req_body != NULL) {
req->transport->req_body(req);
......
......@@ -146,7 +146,7 @@ http1_req_body(struct req *req)
case BS_EOF:
case BS_LENGTH:
case BS_CHUNKED:
if (V1F_Setup_Fetch(req->htc->vfc, req->htc) != 0)
if (V1F_Setup_Fetch(req->vfc, req->htc) != 0)
req->req_body_status = REQ_BODY_FAIL;
break;
default:
......
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