Welcome! Log In Create A New Profile

Advanced

[nginx] SPDY: send output queue after processing of read event.

Valentin Bartenev
January 15, 2014 12:36PM
details: http://hg.nginx.org/nginx/rev/a336cbc3dd44
branches:
changeset: 5520:a336cbc3dd44
user: Valentin Bartenev <vbart@nginx.com>
date: Wed Jan 15 17:16:38 2014 +0400
description:
SPDY: send output queue after processing of read event.

During the processing of input some control frames can be added to the queue.
And if there were no writing streams at the moment, these control frames might
be left unsent for a long time (or even forever).

This long delay is especially critical for PING replies since a client can
consider connection as broken and then resend exactly the same request over
a new connection, which is not safe in case of non-idempotent HTTP methods.

diffstat:

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

diffs (15 lines):

diff -r 22c249dac7c1 -r a336cbc3dd44 src/http/ngx_http_spdy.c
--- a/src/http/ngx_http_spdy.c Wed Jan 15 17:16:38 2014 +0400
+++ b/src/http/ngx_http_spdy.c Wed Jan 15 17:16:38 2014 +0400
@@ -378,6 +378,11 @@ ngx_http_spdy_read_handler(ngx_event_t *
return;
}

+ if (sc->last_out && ngx_http_spdy_send_output_queue(sc) == NGX_ERROR) {
+ ngx_http_spdy_finalize_connection(sc, NGX_HTTP_CLIENT_CLOSED_REQUEST);
+ return;
+ }
+
sc->blocked = 0;

if (sc->processing) {

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

[nginx] SPDY: send output queue after processing of read event.

Valentin Bartenev 625 January 15, 2014 12:36PM



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

Online Users

Guests: 119
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