aboutsummaryrefslogtreecommitdiff
path: root/src/http/v3/ngx_http_v3_request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/v3/ngx_http_v3_request.c')
-rw-r--r--src/http/v3/ngx_http_v3_request.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
index 0bd585317..fb9ea8ff1 100644
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -207,6 +207,7 @@ ngx_http_v3_cleanup_request(void *data)
static void
ngx_http_v3_process_request(ngx_event_t *rev)
{
+ u_char *p;
ssize_t n;
ngx_buf_t *b;
ngx_int_t rc;
@@ -273,7 +274,9 @@ ngx_http_v3_process_request(ngx_event_t *rev)
b->last = b->start + n;
}
- rc = ngx_http_v3_parse_headers(c, st, *b->pos);
+ p = b->pos;
+
+ rc = ngx_http_v3_parse_headers(c, st, b);
if (rc > 0) {
ngx_http_v3_finalize_connection(c, rc,
@@ -302,8 +305,7 @@ ngx_http_v3_process_request(ngx_event_t *rev)
break;
}
- b->pos++;
- r->request_length++;
+ r->request_length += b->pos - p;
if (rc == NGX_AGAIN) {
continue;
@@ -1024,6 +1026,7 @@ ngx_http_v3_request_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
{
off_t max;
size_t size;
+ u_char *p;
ngx_int_t rc;
ngx_buf_t *b;
ngx_uint_t last;
@@ -1078,9 +1081,11 @@ ngx_http_v3_request_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
while (cl->buf->pos < cl->buf->last) {
if (st->length == 0) {
- r->request_length++;
+ p = cl->buf->pos;
+
+ rc = ngx_http_v3_parse_data(r->connection, st, cl->buf);
- rc = ngx_http_v3_parse_data(r->connection, st, *cl->buf->pos++);
+ r->request_length += cl->buf->pos - p;
if (rc == NGX_AGAIN) {
continue;