Mercurial > hg > nginx
changeset 8529:eaea7dac3292 quic
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 25 Aug 2020 12:45:21 +0300 |
parents | 97da6521657c |
children | f882b1784f30 |
files | src/http/ngx_http_request.c src/http/ngx_http_request_body.c |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Tue Aug 25 14:07:26 2020 +0300 +++ b/src/http/ngx_http_request.c Tue Aug 25 12:45:21 2020 +0300 @@ -2819,6 +2819,13 @@ } #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) {
--- a/src/http/ngx_http_request_body.c Tue Aug 25 14:07:26 2020 +0300 +++ b/src/http/ngx_http_request_body.c Tue Aug 25 12:45:21 2020 +0300 @@ -579,6 +579,12 @@ } #endif +#if (NGX_HTTP_QUIC) + if (r->connection->qs) { + return NGX_OK; + } +#endif + if (ngx_http_test_expect(r) != NGX_OK) { return NGX_HTTP_INTERNAL_SERVER_ERROR; }