]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: fixed request length calculation.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 6 Oct 2021 11:51:16 +0000 (14:51 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 6 Oct 2021 11:51:16 +0000 (14:51 +0300)
Previously, when request was blocked, r->request_length was not updated.

src/http/v3/ngx_http_v3_request.c

index 533a50fb886aa845b1b24091edceab8b9beac7fa..44aef49e410966ab6af034af66d557022a3b658a 100644 (file)
@@ -297,6 +297,8 @@ ngx_http_v3_process_request(ngx_event_t *rev)
             break;
         }
 
+        r->request_length += b->pos - p;
+
         if (rc == NGX_BUSY) {
             if (rev->error) {
                 ngx_http_close_request(r, NGX_HTTP_CLOSE);
@@ -310,8 +312,6 @@ ngx_http_v3_process_request(ngx_event_t *rev)
             break;
         }
 
-        r->request_length += b->pos - p;
-
         if (rc == NGX_AGAIN) {
             continue;
         }