Blame SOURCES/nginx-1.16.0-CVE-2019-20372.patch

b6afc7
diff --git a/src/http/ngx_http_special_response.c b/src/http/ngx_http_special_response.c
b6afc7
index 4ffb2cc8ad..76e6705889 100644
b6afc7
--- a/src/http/ngx_http_special_response.c
b6afc7
+++ b/src/http/ngx_http_special_response.c
b6afc7
@@ -623,6 +623,12 @@ ngx_http_send_error_page(ngx_http_request_t *r, ngx_http_err_page_t *err_page)
b6afc7
         return ngx_http_named_location(r, &uri);
b6afc7
     }
b6afc7
 
b6afc7
+    r->expect_tested = 1;
b6afc7
+
b6afc7
+    if (ngx_http_discard_request_body(r) != NGX_OK) {
b6afc7
+        r->keepalive = 0;
b6afc7
+    }
b6afc7
+
b6afc7
     location = ngx_list_push(&r->headers_out.headers);
b6afc7
 
b6afc7
     if (location == NULL) {