aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-01-29 11:53:23 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-01-29 11:53:23 +0000
commit8b57df9480127f2d634d14f4bb7ca6b6a0975709 (patch)
tree5c810fdd413b4fa43d713be95a8c5e3fb9b1a451 /src/http/ngx_http_request.c
parentf51d4fea574bca8799b0e3e695fbbc8c7df914f1 (diff)
downloadnginx-8b57df9480127f2d634d14f4bb7ca6b6a0975709.tar.gz
nginx-8b57df9480127f2d634d14f4bb7ca6b6a0975709.zip
log a real response error code instead of "0"
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c6
1 files changed, 2 insertions, 4 deletions
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) {