HTTP/2: add fast-path for HTTP/2 requests without request body. Change-Id: I9a03c7f10d500e751f05c817094be41459d8017a Signed-off-by: Piotr Sikora <piotrsikora@google.com> Reviewed-on: https://nginx-review.googlesource.com/2830 Reviewed-by: Lizan Zhou <zlizan@google.com>
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 11c0578..34f0dac 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c
@@ -3556,7 +3556,9 @@ stream = r->stream; - if (stream->skip_data) { + if (stream->skip_data + || (stream->in_closed && stream->preread == NULL)) + { r->request_body_no_buffering = 0; post_handler(r); return NGX_OK;