Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: fixed padding handling in HEADERS frame with CON...

Valentin Bartenev
February 02, 2016 08:38AM
details: http://hg.nginx.org/nginx/rev/0e0e2e522fa2
branches:
changeset: 6376:0e0e2e522fa2
user: Valentin Bartenev <vbart@nginx.com>
date: Tue Feb 02 16:33:55 2016 +0300
description:
HTTP/2: fixed padding handling in HEADERS frame with CONTINUATION.

diffstat:

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

diffs (26 lines):

diff -r e30c72b0dfda -r 0e0e2e522fa2 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Tue Feb 02 16:33:55 2016 +0300
+++ b/src/http/v2/ngx_http_v2.c Tue Feb 02 16:33:55 2016 +0300
@@ -1733,11 +1733,21 @@ ngx_http_v2_handle_continuation(ngx_http
u_char *end, ngx_http_v2_handler_pt handler)
{
u_char *p;
- size_t len;
+ size_t len, skip;
uint32_t head;

len = h2c->state.length;

+ if (h2c->state.padding && (size_t) (end - pos) > len) {
+ skip = ngx_min(h2c->state.padding, (end - pos) - len);
+
+ h2c->state.padding -= skip;
+
+ p = pos;
+ pos += skip;
+ ngx_memmove(pos, p, len);
+ }
+
if ((size_t) (end - pos) < len + NGX_HTTP_V2_FRAME_HEADER_SIZE) {
return ngx_http_v2_state_save(h2c, pos, end, handler);
}

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

[nginx] HTTP/2: fixed padding handling in HEADERS frame with CON...

Valentin Bartenev 344 February 02, 2016 08:38AM



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

Online Users

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