From: Igor Sysoev Date: Mon, 1 Aug 2011 11:08:57 +0000 (+0000) Subject: enable lingering close for pipelined requests X-Git-Tag: release-1.1.0~6 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=2f3668b59b0a4235713488c4a79ea61bcf4d4e83;p=nginx.git enable lingering close for pipelined requests patch by Maxim Dounin --- diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 167bc715a..3a21111fa 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2143,7 +2143,11 @@ ngx_http_finalize_connection(ngx_http_request_t *r) ngx_http_set_keepalive(r); return; - } else if (r->lingering_close && clcf->lingering_timeout > 0) { + } else if (clcf->lingering_timeout > 0 + && (r->lingering_close + || r->header_in->pos < r->header_in->last + || r->connection->read->ready)) + { ngx_http_set_lingering_close(r); return; }