You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openresty/patches/nginx/1.27.1/nginx-1.27.1-http2_subreq_e...

21 lines
584 B
C

diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 9593b7f..dbc23ff 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -2560,8 +2560,15 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
return;
}
+#if (NGX_HTTP_V2)
+ if (r->http_version < NGX_HTTP_VERSION_20 || r == r->main) {
+ ngx_http_terminate_request(r, rc);
+ return;
+ }
+#else
ngx_http_terminate_request(r, rc);
return;
+#endif
}
if (rc >= NGX_HTTP_SPECIAL_RESPONSE