aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_request.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index fb00fc988..d37fead3a 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1496,10 +1496,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|| rc == NGX_HTTP_REQUEST_TIME_OUT
|| r->connection->error)
{
- if (rc == NGX_HTTP_CLIENT_CLOSED_REQUEST
- && r->headers_out.status == 0)
- {
- r->headers_out.status = NGX_HTTP_CLIENT_CLOSED_REQUEST;
+ if (rc > 0 && r->headers_out.status == 0) {
+ r->headers_out.status = rc;
}
if (ngx_http_post_action(r) == NGX_OK) {