From 8b57df9480127f2d634d14f4bb7ca6b6a0975709 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 29 Jan 2007 11:53:23 +0000 Subject: log a real response error code instead of "0" --- src/http/ngx_http_request.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/http/ngx_http_request.c') 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) { -- cgit v1.2.3