[PATCH 2 of 5] HTTP/3: fixed request length calculation
Vladimir Homutov
vl at nginx.com
Tue Oct 12 12:46:03 UTC 2021
On Thu, Oct 07, 2021 at 02:36:15PM +0300, Roman Arutyunyan wrote:
> # HG changeset patch
> # User Roman Arutyunyan <arut at nginx.com>
> # Date 1633521076 -10800
> # Wed Oct 06 14:51:16 2021 +0300
> # Branch quic
> # Node ID 1b87f4e196cce2b7aae33a63ca6dfc857b99f2b7
> # Parent d53039c3224e8227979c113f621e532aef7c0f9b
> HTTP/3: fixed request length calculation.
>
> Previously, when request was blocked, r->request_length was not updated.
>
> diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
> --- a/src/http/v3/ngx_http_v3_request.c
> +++ b/src/http/v3/ngx_http_v3_request.c
> @@ -297,6 +297,8 @@ ngx_http_v3_process_request(ngx_event_t
> 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
> break;
> }
>
> - r->request_length += b->pos - p;
> -
> if (rc == NGX_AGAIN) {
> continue;
> }
Looks good
More information about the nginx-devel
mailing list