Welcome! Log In Create A New Profile

Advanced

[nginx] HTTP/2: improved HPACK integer parsing code readability.

Valentin Bartenev
October 20, 2015 02:34PM
details: http://hg.nginx.org/nginx/rev/adaac65899c8
branches:
changeset: 6267:adaac65899c8
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Oct 20 21:26:38 2015 +0300
description:
HTTP/2: improved HPACK integer parsing code readability.

No functional changes.

diffstat:

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

diffs (23 lines):

diff -r dceb078b1156 -r adaac65899c8 src/http/v2/ngx_http_v2.c
--- a/src/http/v2/ngx_http_v2.c Tue Oct 20 18:16:18 2015 +0300
+++ b/src/http/v2/ngx_http_v2.c Tue Oct 20 21:26:38 2015 +0300
@@ -2396,8 +2396,8 @@ ngx_http_v2_parse_int(ngx_http_v2_connec
return value;
}

- if (end - p > NGX_HTTP_V2_INT_OCTETS - 1) {
- end = p + NGX_HTTP_V2_INT_OCTETS - 1;
+ if (end - start > NGX_HTTP_V2_INT_OCTETS) {
+ end = start + NGX_HTTP_V2_INT_OCTETS;
}

for (shift = 0; p != end; shift += 7) {
@@ -2417,7 +2417,7 @@ ngx_http_v2_parse_int(ngx_http_v2_connec
}
}

- if ((size_t) (end - start) >= NGX_HTTP_V2_INT_OCTETS) {
+ if (end == start + NGX_HTTP_V2_INT_OCTETS) {
return NGX_DECLINED;
}


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

[nginx] HTTP/2: improved HPACK integer parsing code readability.

Valentin Bartenev 502 October 20, 2015 02:34PM



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

Online Users

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