Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: reuse of connections with incomplete frames.

Maxim Dounin
February 11, 2021 02:58PM
details: https://hg.nginx.org/nginx/rev/fc536dcdbbf7
branches:
changeset: 7768:fc536dcdbbf7
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Feb 11 21:52:12 2021 +0300
description:
HTTP/2: reuse of connections with incomplete frames.

Prodded by Taewoo Kim.

diffstat:

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

diffs (32 lines):

diff -r 6d98f29867e8 -r fc536dcdbbf7 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Thu Feb 11 21:52:11 2021 +0300
+++ b/src/http/v2/ngx_http_v2.c Thu Feb 11 21:52:12 2021 +0300
@@ -362,6 +362,11 @@ ngx_http_v2_read_handler(ngx_event_t *re
return;
}

+ if (!h2c->processing && !h2c->pushing) {
+ ngx_http_v2_finalize_connection(h2c, NGX_HTTP_V2_NO_ERROR);
+ return;
+ }
+
if (!h2c->goaway) {
h2c->goaway = 1;

@@ -668,6 +673,8 @@ ngx_http_v2_handle_connection(ngx_http_v
return;
}

+ ngx_reusable_connection(c, 1);
+
h2scf = ngx_http_get_module_srv_conf(h2c->http_connection->conf_ctx,
ngx_http_v2_module);
if (h2c->state.incomplete) {
@@ -689,7 +696,6 @@ ngx_http_v2_handle_connection(ngx_http_v
#endif

c->destroyed = 1;
- ngx_reusable_connection(c, 1);

c->write->handler = ngx_http_empty_handler;
c->read->handler = ngx_http_v2_idle_handler;
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] HTTP/2: reuse of connections with incomplete frames.

Maxim Dounin 61 February 11, 2021 02:58PM



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

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready