From: Igor Sysoev Date: Mon, 29 Jan 2007 11:53:23 +0000 (+0000) Subject: log a real response error code instead of "0" X-Git-Tag: release-0.5.11~7 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=8b57df9480127f2d634d14f4bb7ca6b6a0975709;p=nginx.git log a real response error code instead of "0" --- 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) {