ignatenkobrain / rpms / nginx

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