Mercurial > hg > nginx
diff src/http/ngx_http_request.c @ 3984:3e51832c8215
lingering_close "off|on|always"
patch by Maxim Dounin
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 01 Aug 2011 13:26:55 +0000 |
parents | e126d997cbc6 |
children | 07d1aa82899b |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c Mon Aug 01 13:08:03 2011 +0000 +++ b/src/http/ngx_http_request.c Mon Aug 01 13:26:55 2011 +0000 @@ -2142,11 +2142,13 @@ { ngx_http_set_keepalive(r); return; - - } else if (clcf->lingering_timeout > 0 - && (r->lingering_close - || r->header_in->pos < r->header_in->last - || r->connection->read->ready)) + } + + 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;