diff options
author | Ruslan Ermilov <ru@nginx.com> | 2018-01-30 14:44:31 +0300 |
---|---|---|
committer | Ruslan Ermilov <ru@nginx.com> | 2018-01-30 14:44:31 +0300 |
commit | 22136953689e4f48c2bc90a01f39e23a4b6428af (patch) | |
tree | 86d396c2dac0c03b4b3cd85489cdd7022a9f4532 | |
parent | 0b8b91f45fcdd45532f8fc663f0af27711b03cea (diff) | |
download | nginx-22136953689e4f48c2bc90a01f39e23a4b6428af.tar.gz nginx-22136953689e4f48c2bc90a01f39e23a4b6428af.zip |
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.
-rw-r--r-- | src/http/v2/ngx_http_v2.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c index 8507eac26..8c752db65 100644 --- a/src/http/v2/ngx_http_v2.c +++ b/src/http/v2/ngx_http_v2.c @@ -1583,14 +1583,7 @@ ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos, } 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; } |