From fa1e1beadca8b1ea900ec654919aea58762ab746 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Fri, 27 Mar 2020 19:41:06 +0300 Subject: Parsing HTTP/3 request body. --- src/http/ngx_http_parse.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/http/ngx_http_parse.c') diff --git a/src/http/ngx_http_parse.c b/src/http/ngx_http_parse.c index 28aa8b0dd..92bcf12ad 100644 --- a/src/http/ngx_http_parse.c +++ b/src/http/ngx_http_parse.c @@ -2185,6 +2185,12 @@ ngx_http_parse_chunked(ngx_http_request_t *r, ngx_buf_t *b, sw_trailer_header_almost_done } state; +#if (NGX_HTTP_V3) + if (r->http_version == NGX_HTTP_VERSION_30) { + return ngx_http_v3_parse_request_body(r, b, ctx); + } +#endif + state = ctx->state; if (state == sw_chunk_data && ctx->size == 0) { @@ -2371,6 +2377,11 @@ ngx_http_parse_chunked(ngx_http_request_t *r, ngx_buf_t *b, } } + if (b->last_buf) { + /* XXX client prematurely closed connection */ + return NGX_ERROR; + } + data: ctx->state = state; -- cgit