diff options
author | Valentin Bartenev <vbart@nginx.com> | 2013-10-01 00:00:57 +0400 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2013-10-01 00:00:57 +0400 |
commit | 6ba03097dbc592646303dacdf169b1162a119af7 (patch) | |
tree | 8013e7166540fb1aa9082e63714643efd6f0c1cb /src | |
parent | ef8c64acbe7b826b2bbd2dacc0e173cf79b26d37 (diff) | |
download | nginx-6ba03097dbc592646303dacdf169b1162a119af7.tar.gz nginx-6ba03097dbc592646303dacdf169b1162a119af7.zip |
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().
Diffstat (limited to 'src')
-rw-r--r-- | src/http/ngx_http_spdy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/http/ngx_http_spdy.c b/src/http/ngx_http_spdy.c index e7bebccd5..a1ac18479 100644 --- a/src/http/ngx_http_spdy.c +++ b/src/http/ngx_http_spdy.c @@ -1214,6 +1214,7 @@ ngx_http_spdy_state_data(ngx_http_spdy_connection_t *sc, u_char *pos, } if (rb->post_handler) { + r->read_event_handler = ngx_http_block_reading; rb->post_handler(r); } } @@ -2607,6 +2608,9 @@ ngx_http_spdy_read_request_body(ngx_http_request_t *r, 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; } |