diff options
author | Igor Sysoev <igor@sysoev.ru> | 2011-08-01 13:26:55 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2011-08-01 13:26:55 +0000 |
commit | 2505587b4d87479bac239635cec2b893885795fd (patch) | |
tree | 52b0aa847d35ec4968acf8fa245638bdda1a4cb4 /src/http/ngx_http_request.c | |
parent | 41c8a1d27f477887862a70d28044b9e5eea808ab (diff) | |
download | nginx-2505587b4d87479bac239635cec2b893885795fd.tar.gz nginx-2505587b4d87479bac239635cec2b893885795fd.zip |
lingering_close "off|on|always"
patch by Maxim Dounin
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index bcd5eb827..d11b13e4a 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -2142,11 +2142,13 @@ ngx_http_finalize_connection(ngx_http_request_t *r) { 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; |