[PATCH 3 of 4] HTTP/3: trigger 400 (Bad Request) on stream error while blocked
Roman Arutyunyan
arut at nginx.com
Tue Jan 10 13:28:05 UTC 2023
# HG changeset patch
# User Roman Arutyunyan <arut at nginx.com>
# Date 1672928146 -14400
# Thu Jan 05 18:15:46 2023 +0400
# Branch quic
# Node ID 7358ff656a6b124166926c026a13ec3057b6db6b
# Parent 18cc0fb5509d09d241d1235c754031304fa51685
HTTP/3: trigger 400 (Bad Request) on stream error while blocked.
Previously, stream was closed with NGX_HTTP_CLOSE. However, in a similar case
when recv() returns eof or error, status 400 is triggered.
diff --git a/src/http/v3/ngx_http_v3_request.c b/src/http/v3/ngx_http_v3_request.c
--- a/src/http/v3/ngx_http_v3_request.c
+++ b/src/http/v3/ngx_http_v3_request.c
@@ -554,7 +554,7 @@ ngx_http_v3_process_request(ngx_event_t
if (rc == NGX_BUSY) {
if (rev->error) {
- ngx_http_close_request(r, NGX_HTTP_CLOSE);
+ ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
break;
}
More information about the nginx-devel
mailing list