Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: simplified checking the END_STREAM flag.

Valentin Bartenev
October 26, 2015 10:48AM
details: http://hg.nginx.org/nginx/rev/16905ecbb49e
branches:
changeset: 6280:16905ecbb49e
user: Valentin Bartenev <vbart@nginx.com>
date: Mon Oct 26 17:46:28 2015 +0300
description:
HTTP/2: simplified checking the END_STREAM flag.

No functional changes.

diffstat:

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

diffs (32 lines):

diff -r c72eaf694d99 -r 16905ecbb49e src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Mon Oct 26 17:46:16 2015 +0300
+++ b/src/http/v2/ngx_http_v2.c Mon Oct 26 17:46:28 2015 +0300
@@ -870,6 +870,8 @@ ngx_http_v2_state_data(ngx_http_v2_conne
return ngx_http_v2_state_skip_padded(h2c, pos, end);
}

+ stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
+
h2c->state.stream = stream;

return ngx_http_v2_state_read_data(h2c, pos, end);
@@ -897,8 +899,6 @@ ngx_http_v2_state_read_data(ngx_http_v2_
}

if (stream->skip_data) {
- stream->in_closed = h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG;
-
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, h2c->connection->log, 0,
"skipping http2 DATA frame, reason: %d",
stream->skip_data);
@@ -988,9 +988,7 @@ ngx_http_v2_state_read_data(ngx_http_v2_
ngx_http_v2_state_read_data);
}

- if (h2c->state.flags & NGX_HTTP_V2_END_STREAM_FLAG) {
- stream->in_closed = 1;
-
+ if (stream->in_closed) {
if (r->headers_in.content_length_n < 0) {
r->headers_in.content_length_n = rb->rest;


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

[nginx] HTTP/2: simplified checking the END_STREAM flag.

Valentin Bartenev 485 October 26, 2015 10:48AM



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

Online Users

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