summaryrefslogtreecommitdiffhomepage
path: root/src/http/v2
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2023-03-29 11:14:25 +0400
committerSergey Kandaurov <pluknet@nginx.com>2023-03-29 11:14:25 +0400
commite8fbc967470b39513248cd961ccccf7a032831ea (patch)
treea08db4a8af3ad8bc454e1f905bed02e2544d8567 /src/http/v2
parent25d8ab363b7ac63c37f21b35edc92b02bd0a74cc (diff)
parentdfe70f74a3558f05142fb552cea239add123d414 (diff)
downloadnginx-e8fbc967470b39513248cd961ccccf7a032831ea.tar.gz
nginx-e8fbc967470b39513248cd961ccccf7a032831ea.tar.bz2
Merged with the default branch.
Diffstat (limited to 'src/http/v2')
-rw-r--r--src/http/v2/ngx_http_v2.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/http/v2/ngx_http_v2.c b/src/http/v2/ngx_http_v2.c
index 0e45a7b27..ea3f27c07 100644
--- a/src/http/v2/ngx_http_v2.c
+++ b/src/http/v2/ngx_http_v2.c
@@ -1730,6 +1730,7 @@ ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos,
size_t len;
ngx_int_t rc;
ngx_table_elt_t *h;
+ ngx_connection_t *fc;
ngx_http_header_t *hh;
ngx_http_request_t *r;
ngx_http_v2_header_t *header;
@@ -1789,17 +1790,11 @@ ngx_http_v2_state_process_header(ngx_http_v2_connection_t *h2c, u_char *pos,
}
r = h2c->state.stream->request;
+ fc = r->connection;
/* TODO Optimization: validate headers while parsing. */
if (ngx_http_v2_validate_header(r, header) != NGX_OK) {
- 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;
}
@@ -1886,6 +1881,8 @@ error:
h2c->state.stream = NULL;
+ ngx_http_run_posted_requests(fc);
+
return ngx_http_v2_state_header_complete(h2c, pos, end);
}