Commit 40ec4a6b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

The chunk-counter is http/1 specific

parent db403d95
......@@ -582,6 +582,7 @@ struct req {
struct {
ssize_t bytes_done;
ssize_t bytes_yet;
intptr_t chunk_ctr;
} h1; /* HTTP1 specific */
/* The busy objhead we sleep on */
......@@ -599,7 +600,6 @@ struct req {
unsigned char wantbody;
uint64_t req_bodybytes; /* Parsed req bodybytes */
intptr_t chunk_ctr; /* Parsed req bodybytes */
uint64_t resp_hdrbytes; /* Scheduled resp hdrbytes */
uint64_t resp_bodybytes; /* Scheduled resp bodybytes */
......
......@@ -286,7 +286,7 @@ http1_req_body_status(struct req *req)
return (REQ_BODY_PRESENT);
}
if (http_HdrIs(req->http, H_Transfer_Encoding, "chunked")) {
req->chunk_ctr = -1;
req->h1.chunk_ctr = -1;
return (REQ_BODY_CHUNKED);
}
if (http_GetHdr(req->http, H_Transfer_Encoding, NULL))
......@@ -511,7 +511,7 @@ http1_iter_req_body(struct req *req, enum req_body_state_e bs,
req->acct.req_bodybytes += len;
return (len);
} else if (bs == REQ_BODY_CHUNKED) {
switch (HTTP1_Chunked(req->htc, &req->chunk_ctr, &err,
switch (HTTP1_Chunked(req->htc, &req->h1.chunk_ctr, &err,
&req->acct.req_bodybytes, buf, &len)) {
case H1CR_ERROR:
VSLb(req->vsl, SLT_Debug, "CHUNKERR: %s", err);
......
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