Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: finalize request as bad if parsing of pseudo-headers fails.

January 30, 2018 07:28AM
details: http://hg.nginx.org/nginx/rev/d5a535774861
branches:
changeset: 7192:d5a535774861
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Jan 30 14:44:31 2018 +0300
description:
HTTP/2: finalize request as bad if parsing of pseudo-headers fails.

This is in line when the required pseudo-headers are missing, and
avoids spurious zero statuses in access.log.

diffstat:

src/http/v2/ngx_http_v2.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)

diffs (19 lines):

diff -r 61d276dcd493 -r d5a535774861 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Mon Jan 29 16:06:33 2018 +0300
+++ b/src/http/v2/ngx_http_v2.c Tue Jan 30 14:44:31 2018 +0300
@@ -1583,14 +1583,7 @@ ngx_http_v2_state_process_header(ngx_htt
}

if (rc == NGX_DECLINED) {
- if (ngx_http_v2_terminate_stream(h2c, h2c->state.stream,
- NGX_HTTP_V2_PROTOCOL_ERROR)
- == NGX_ERROR)
- {
- return ngx_http_v2_connection_error(h2c,
- NGX_HTTP_V2_INTERNAL_ERROR);
- }
-
+ ngx_http_finalize_request(r, NGX_HTTP_BAD_REQUEST);
goto error;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: finalize request as bad if parsing of pseudo-headers fails.

ru@nginx.com 675 January 30, 2018 07:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 325
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready