Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 4042:d9b486dbf7e5 stable-1.0
Merge of r3982, r3984, r3985, r3991:
Lingering closing related fixes:
*) lingering_close "off|on|always"
*) enable lingering close for pipelined requests
*) do not send RST on normal lingering close read timeout,
if reset_timedout_connection is on
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 29 Aug 2011 12:45:03 +0000 |
parents | 0094c8636d5f |
children | 795761886688 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Mon Aug 29 12:35:53 2011 +0000 +++ b/src/http/ngx_http_request.c Mon Aug 29 12:45:03 2011 +0000 @@ -2142,8 +2142,14 @@ { ngx_http_set_keepalive(r); return; - - } else if (r->lingering_close && clcf->lingering_timeout > 0) { + } + + if (clcf->lingering_close == NGX_HTTP_LINGERING_ALWAYS + || (clcf->lingering_close == NGX_HTTP_LINGERING_ON + && (r->lingering_close + || r->header_in->pos < r->header_in->last + || r->connection->read->ready))) + { ngx_http_set_lingering_close(r); return; } @@ -2769,7 +2775,6 @@ "http lingering close handler"); if (rev->timedout) { - c->timedout = 1; ngx_http_close_request(r, 0); return; }