From 693e55a4b232afc6f7b4ba8e25f07decd86baa21 Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Tue, 25 Aug 2020 12:45:21 +0300 Subject: HTTP/3: drop the unwanted remainder of the request. As per HTTP/3 draft 29, section 4.1: When the server does not need to receive the remainder of the request, it MAY abort reading the request stream, send a complete response, and cleanly close the sending part of the stream. --- src/http/ngx_http_request.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 7dbbcceb2..e322fae4b 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2819,6 +2819,13 @@ ngx_http_finalize_connection(ngx_http_request_t *r) } #endif +#if (NGX_HTTP_QUIC) + if (r->connection->qs) { + ngx_http_close_request(r, 0); + return; + } +#endif + clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); if (r->main->count != 1) { -- cgit v1.2.3