Welcome! Log In Create A New Profile

Advanced

[PATCH] HTTP/2: fixed handling of fully preread request bodies

Piotr Sikora via nginx-devel
November 27, 2018 05:36AM
# HG changeset patch
# User Piotr Sikora <piotrsikora@google.com>
# Date 1540435636 25200
# Wed Oct 24 19:47:16 2018 -0700
# Node ID 466c154c5c53b956660211df96331b3c25669485
# Parent be5cb9c67c05ccaf22dab7abba78aa4c1545a8ee
HTTP/2: fixed handling of fully preread request bodies.

Previously, fully preread request body of a request without the
"Content-Length" header was always written to a temporary file.

Reported by Wayne Zhang.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>

diff -r be5cb9c67c05 -r 466c154c5c53 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -3863,6 +3863,12 @@ ngx_http_v2_read_request_body(ngx_http_r
{
rb->buf = ngx_create_temp_buf(r->pool, (size_t) len);

+ } else if (len < 0 && stream->in_closed && stream->preread
+ && !r->request_body_in_file_only)
+ {
+ rb->buf = ngx_create_temp_buf(r->pool,
+ (size_t) ngx_buf_size(stream->preread));
+
} else {
rb->buf = ngx_calloc_buf(r->pool);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] HTTP/2: fixed handling of fully preread request bodies

Piotr Sikora via nginx-devel 474 November 27, 2018 05:36AM

Re: [PATCH] HTTP/2: fixed handling of fully preread request bodies

Maxim Dounin 147 December 02, 2018 09:34AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 195
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready