Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: fixed the "http request count is zero" alert.

Valentin Bartenev
June 16, 2016 01:58PM
details: http://hg.nginx.org/nginx/rev/d375f4210e41
branches:
changeset: 6590:d375f4210e41
user: Valentin Bartenev <vbart@nginx.com>
date: Thu Jun 16 20:55:11 2016 +0300
description:
HTTP/2: fixed the "http request count is zero" alert.

When the stream is terminated the HEADERS frame can still wait in the output
queue. This frame can't be removed and must be sent to the client anyway,
since HTTP/2 uses stateful compression for headers. So in order to postpone
closing and freeing memory of such stream the special close stream handler
is set to the write event. After the HEADERS frame is sent the write event
is called and the stream will be finally closed.

Some events like receiving a RST_STREAM can trigger the read handler of such
stream in closing state and cause unexpected processing that can result in
another attempt to finalize the request. To prevent it the read handler is
now set to ngx_http_empty_handler.

Thanks to Amazon.

diffstat:

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

diffs (11 lines):

diff -r 78533a74af11 -r d375f4210e41 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Thu Jun 16 20:55:11 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c Thu Jun 16 20:55:11 2016 +0300
@@ -3935,6 +3935,7 @@ ngx_http_v2_close_stream(ngx_http_v2_str

if (stream->queued) {
fc->write->handler = ngx_http_v2_close_stream_handler;
+ fc->read->handler = ngx_http_empty_handler;
return;
}


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

[nginx] HTTP/2: fixed the "http request count is zero" alert.

Valentin Bartenev 1878 June 16, 2016 01:58PM



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