log a real response error code instead of "0"

This commit is contained in:
Igor Sysoev 2007-01-29 11:53:23 +00:00
parent f51d4fea57
commit 8b57df9480

View File

@ -1496,10 +1496,8 @@ ngx_http_finalize_request(ngx_http_request_t *r, ngx_int_t rc)
|| rc == NGX_HTTP_REQUEST_TIME_OUT || rc == NGX_HTTP_REQUEST_TIME_OUT
|| r->connection->error) || r->connection->error)
{ {
if (rc == NGX_HTTP_CLIENT_CLOSED_REQUEST if (rc > 0 && r->headers_out.status == 0) {
&& r->headers_out.status == 0) r->headers_out.status = rc;
{
r->headers_out.status = NGX_HTTP_CLIENT_CLOSED_REQUEST;
} }
if (ngx_http_post_action(r) == NGX_OK) { if (ngx_http_post_action(r) == NGX_OK) {