# HG changeset patch # User Igor Sysoev # Date 1254312308 0 # Node ID 60bc5cc68d3bd410a33649aee345f13392118d5b # Parent cad19e8e0cc8792448d361d0cfea9fe22f6341f3 log 499 instead 0, the bug was introduced in r3050 diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2048,6 +2048,10 @@ ngx_http_terminate_request(ngx_http_requ 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;