Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: prevented output of the HEADERS frame for canceled streams.

Valentin Bartenev
July 19, 2016 01:28PM
details: http://hg.nginx.org/nginx/rev/699e409a3e0c
branches:
changeset: 6637:699e409a3e0c
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Jul 19 20:22:44 2016 +0300
description:
HTTP/2: prevented output of the HEADERS frame for canceled streams.

It's useless to generate HEADERS if the stream has been canceled already.

diffstat:

src/http/v2/ngx_http_v2_filter_module.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r ea284434db0f -r 699e409a3e0c src/http/v2/ngx_http_v2_filter_module.c
--- a/src/http/v2/ngx_http_v2_filter_module.c Tue Jul 19 20:22:44 2016 +0300
+++ b/src/http/v2/ngx_http_v2_filter_module.c Tue Jul 19 20:22:44 2016 +0300
@@ -165,6 +165,12 @@ ngx_http_v2_header_filter(ngx_http_reque
return NGX_OK;
}

+ fc = r->connection;
+
+ if (fc->error) {
+ return NGX_ERROR;
+ }
+
if (r->method == NGX_HTTP_HEAD) {
r->header_only = 1;
}
@@ -255,8 +261,6 @@ ngx_http_v2_header_filter(ngx_http_reque
len += 1 + ngx_http_v2_literal_size("Wed, 31 Dec 1986 18:00:00 GMT");
}

- fc = r->connection;
-
if (r->headers_out.location && r->headers_out.location->value.len) {

if (r->headers_out.location->value.data[0] == '/') {

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

[nginx] HTTP/2: prevented output of the HEADERS frame for canceled streams.

Valentin Bartenev 376 July 19, 2016 01:28PM



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

Online Users

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