aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-10-02 11:32:56 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-10-02 11:32:56 +0000
commit703f15d8a25571c1095c0e35143c4e1679c62e6f (patch)
tree9bfac14dc430146e4958a5d4a6bb10a08c3d8428 /src
parent2d24d749e48bebc8b5231db4787cf1fdbe950ebd (diff)
downloadnginx-703f15d8a25571c1095c0e35143c4e1679c62e6f.tar.gz
nginx-703f15d8a25571c1095c0e35143c4e1679c62e6f.zip
clear r->lingering_close to disable preventively calling
ngx_http_set_lingering_close() while request cleanup
Diffstat (limited to 'src')
-rw-r--r--src/http/ngx_http_request_body.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index 83e2d015b..3ee2ea477 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -475,7 +475,10 @@ ngx_http_discard_request_body(ngx_http_request_t *r)
return NGX_HTTP_INTERNAL_SERVER_ERROR;
}
- if (ngx_http_read_discarded_request_body(r) != NGX_OK) {
+ if (ngx_http_read_discarded_request_body(r) == NGX_OK) {
+ r->lingering_close = 0;
+
+ } else {
r->count++;
r->discard_body = 1;
}
@@ -508,6 +511,7 @@ ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
if (timer <= 0) {
r->discard_body = 0;
+ r->lingering_close = 0;
ngx_http_finalize_request(r, 0);
return;
}
@@ -521,6 +525,7 @@ ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
if (rc == NGX_OK) {
r->discard_body = 0;
+ r->lingering_close = 0;
if (r->done) {
ngx_http_finalize_request(r, 0);