diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-07-22 13:30:16 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-07-22 13:30:16 +0000 |
commit | a3741fb24d9dc5ec0477d0cb3f513322ae7bfbb9 (patch) | |
tree | 33426254c8f62ed68f0ace58a8209e903b5af17a /src | |
parent | b0b6bcedfc4b74bfe13b55b684a9cfc9e03ac100 (diff) | |
download | nginx-a3741fb24d9dc5ec0477d0cb3f513322ae7bfbb9.tar.gz nginx-a3741fb24d9dc5ec0477d0cb3f513322ae7bfbb9.zip |
finalizing with rc == 0 in unbuffered proxy mode caused nginx to wait
for another send_timeout before actually closing client's connection
if client timed out while still talking to upstream server
patch by Maxim Dounin
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_upstream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index ad5b449ec..42b351c4d 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -2317,7 +2317,7 @@ ngx_http_upstream_process_non_buffered_downstream(ngx_http_request_t *r) if (wev->timedout) { c->timedout = 1; ngx_connection_error(c, NGX_ETIMEDOUT, "client timed out"); - ngx_http_upstream_finalize_request(r, u, 0); + ngx_http_upstream_finalize_request(r, u, NGX_HTTP_REQUEST_TIME_OUT); return; } @@ -3013,6 +3013,7 @@ ngx_http_upstream_finalize_request(ngx_http_request_t *r, #endif if (u->header_sent + && rc != NGX_HTTP_REQUEST_TIME_OUT && (rc == NGX_ERROR || rc >= NGX_HTTP_SPECIAL_RESPONSE)) { rc = 0; |