diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-08-01 11:08:57 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-08-01 11:08:57 +0000 |
commit | 2f3668b59b0a4235713488c4a79ea61bcf4d4e83 (patch) | |
tree | e0f8f7e06fb7f2d21743018c4b5b70c521ee2b84 | |
parent | 721f47ed3cd822c92b8d5e6d44c098db57dea6f9 (diff) | |
download | nginx-2f3668b59b0a4235713488c4a79ea61bcf4d4e83.tar.gz nginx-2f3668b59b0a4235713488c4a79ea61bcf4d4e83.zip |
enable lingering close for pipelined requests
patch by Maxim Dounin
-rw-r--r-- | src/http/ngx_http_request.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |