diff options
author | Igor Sysoev <igor@sysoev.ru> | 2007-09-01 16:40:19 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2007-09-01 16:40:19 +0000 |
commit | 2253064361e4ab083d01d850cd80dd98daf8721b (patch) | |
tree | 6fcf4c28ab6283622bbd0e6c316169da8d21933d /src | |
parent | 140c7556a27050f5059e2edd9b038835ff6cd338 (diff) | |
download | nginx-2253064361e4ab083d01d850cd80dd98daf8721b.tar.gz nginx-2253064361e4ab083d01d850cd80dd98daf8721b.zip |
fix socket leak introduced in r1374 when request header and body was
in one packet and connection went to keep-alive state
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_request_body.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/http/ngx_http_request_body.c b/src/http/ngx_http_request_body.c index 9c34b7c2e..2906c896f 100644 --- a/src/http/ngx_http_request_body.c +++ b/src/http/ngx_http_request_body.c @@ -446,8 +446,6 @@ ngx_http_discard_request_body(ngx_http_request_t *r) return NGX_OK; } - r->discard_body = 1; - size = r->header_in->last - r->header_in->pos; if (size) { @@ -461,6 +459,8 @@ ngx_http_discard_request_body(ngx_http_request_t *r) } } + r->discard_body = 1; + r->read_event_handler = ngx_http_read_discarded_request_body_handler; if (ngx_handle_read_event(rev, 0) == NGX_ERROR) { |