mirror of
https://github.com/nginx/nginx.git
synced 2024-12-04 13:59:00 +08:00
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.
This commit is contained in:
parent
4e4d0938b9
commit
693e55a4b2
@ -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) {
|
||||
|
@ -579,6 +579,12 @@ ngx_http_discard_request_body(ngx_http_request_t *r)
|
||||
}
|
||||
#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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user