Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: fixed connection leak while waiting for request body.

Valentin Bartenev
September 30, 2013 04:40PM
details: http://hg.nginx.org/nginx/rev/4d0c70541784
branches:
changeset: 5402:4d0c70541784
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Oct 01 00:00:57 2013 +0400
description:
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:

src/http/ngx_http_spdy.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r 09fc4598fc8e -r 4d0c70541784 src/http/ngx_http_spdy.c
--- 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 @@ ngx_http_spdy_state_data(ngx_http_spdy_c
}

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

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;
}


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] SPDY: fixed connection leak while waiting for request body.

Valentin Bartenev 908 September 30, 2013 04:40PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready