]> git.kaiwu.me - nginx.git/commitdiff
log a real response error code instead of "0"
authorIgor Sysoev <igor@sysoev.ru>
Mon, 29 Jan 2007 11:53:23 +0000 (11:53 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Mon, 29 Jan 2007 11:53:23 +0000 (11:53 +0000)
src/http/ngx_http_request.c

index fb00fc988194721c16634056c5b4c1c72fdaf82c..d37fead3a4361324716001b0739b6a12cf1d6976 100644 (file)
@@ -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) {