summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-10-19 16:06:57 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-10-19 16:06:57 +0000
commit7060e670f40ec36836400090529bd82c00461258 (patch)
tree199c3850d6fa423edaf18a2d76c386d2ac20bb69
parent11e5d7f19016225457efaf805fa3551a2528e278 (diff)
downloadnginx-7060e670f40ec36836400090529bd82c00461258.tar.gz
nginx-7060e670f40ec36836400090529bd82c00461258.tar.bz2
fix ngx_http_finalize_request() code after a body has been discarded
-rw-r--r--src/http/ngx_http_request_body.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c
index d41e7959b..62c962db7 100644
--- a/src/http/ngx_http_request_body.c
+++ b/src/http/ngx_http_request_body.c
@@ -503,7 +503,7 @@ ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
if (rev->timedout) {
c->timedout = 1;
c->error = 1;
- ngx_http_finalize_request(r, 0);
+ ngx_http_finalize_request(r, NGX_ERROR);
return;
}
@@ -513,7 +513,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);
+ ngx_http_finalize_request(r, NGX_ERROR);
return;
}
@@ -524,14 +524,9 @@ ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
rc = ngx_http_read_discarded_request_body(r);
if (rc == NGX_OK) {
-
r->discard_body = 0;
r->lingering_close = 0;
-
- if (r->done) {
- ngx_http_finalize_request(r, 0);
- }
-
+ ngx_http_finalize_request(r, NGX_DONE);
return;
}
@@ -539,7 +534,7 @@ ngx_http_read_discarded_request_body_handler(ngx_http_request_t *r)
if (ngx_handle_read_event(rev, 0) != NGX_OK) {
c->error = 1;
- ngx_http_finalize_request(r, rc);
+ ngx_http_finalize_request(r, NGX_ERROR);
return;
}