Mercurial > hg > nginx
changeset 5402:4d0c70541784
SPDY: fixed connection leak while waiting for request body.
If an error occurs in a SPDY connection, the c->error flag is set on every fake
request connection, and its read or write event handler is called, in order to
finalize it. But while waiting for a request body, it was a no-op since the
read event handler ngx_http_request_handler() calls r->read_event_handler that
had been set to ngx_http_block_reading().
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 01 Oct 2013 00:00:57 +0400 |
parents | 09fc4598fc8e |
children | 7e062646da6f |
files | src/http/ngx_http_spdy.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_spdy.c Mon Sep 30 22:10:13 2013 +0400 +++ b/src/http/ngx_http_spdy.c Tue Oct 01 00:00:57 2013 +0400 @@ -1214,6 +1214,7 @@ } if (rb->post_handler) { + r->read_event_handler = ngx_http_block_reading; rb->post_handler(r); } } @@ -2607,6 +2608,9 @@ r->request_body->post_handler = post_handler; + r->read_event_handler = ngx_http_test_reading; + r->write_event_handler = ngx_http_request_empty_handler; + return NGX_AGAIN; }