]> git.kaiwu.me - nginx.git/commitdiff
log 499 instead 0, the bug was introduced in r3050
authorIgor Sysoev <igor@sysoev.ru>
Wed, 30 Sep 2009 12:05:08 +0000 (12:05 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Wed, 30 Sep 2009 12:05:08 +0000 (12:05 +0000)
src/http/ngx_http_request.c

index 48b57206b4c4c17c2b63747da15d836cdac29ae8..7efa2824654679062fb508782530e5d92d18e6fa 100644 (file)
@@ -2048,6 +2048,10 @@ ngx_http_terminate_request(ngx_http_request_t *r, ngx_int_t rc)
     ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                    "http terminate request count:%d", mr->count);
 
+    if (rc > 0 && (mr->headers_out.status == 0 || mr->connection->sent == 0)) {
+        mr->headers_out.status = rc;
+    }
+
     cln = mr->cleanup;
     mr->cleanup = NULL;