]> git.kaiwu.me - nginx.git/commitdiff
Upstream: NGX_HTTP_CLIENT_CLOSED_REQUEST no longer reset to 0.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 11:00:25 +0000 (15:00 +0400)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 25 Jul 2013 11:00:25 +0000 (15:00 +0400)
The NGX_HTTP_CLIENT_CLOSED_REQUEST code is allowed to happen after we
started sending a response (much like NGX_HTTP_REQUEST_TIME_OUT), so there
is no need to reset response code to 0 in this case.

src/http/ngx_http_upstream.c

index c4e0c645c3cc0bb87ef57dd15cc0c4382c82eb7f..8590f4e2e66c5e4c9fa280939088505866e90db7 100644 (file)
@@ -3405,6 +3405,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r,
 
     if (u->header_sent
         && rc != NGX_HTTP_REQUEST_TIME_OUT
+        && rc != NGX_HTTP_CLIENT_CLOSED_REQUEST
         && (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE))
     {
         rc = 0;