Welcome! Log In Create A New Profile

Advanced

fix index type when looking up dynamic table

sun edward
May 23, 2021 11:14PM
# HG changeset patch
# User Zhiyong Sun <sunzhiyong3210@gmail.com>
# Date 1621825861 14400
# Sun May 23 23:11:01 2021 -0400
# Branch quic
# Node ID be8115b87d5abbd8d5e6afdccbcf2c0c2016113c
# Parent 557dc6a06ba6ea7e78444067c4b8fbb022f7b191
convert qpack absolute index to relative index when lookup dynamic table

diff -r 557dc6a06ba6 -r be8115b87d5a src/http/v3/ngx_http_v3_tables.c
--- a/src/http/v3/ngx_http_v3_tables.c Tue May 18 18:17:25 2021 +0300
+++ b/src/http/v3/ngx_http_v3_tables.c Sun May 23 23:11:01 2021 -0400
@@ -159,9 +159,19 @@
ngx_http_v3_ref_insert(ngx_connection_t *c, ngx_uint_t dynamic,
ngx_uint_t index, ngx_str_t *value)
{
+ ngx_http_v3_connection_t *h3c;
+ ngx_http_v3_dynamic_table_t *dt;
ngx_str_t name;

if (dynamic) {
+ h3c = c->quic->parent->data;
+ dt = &h3c->table;
+
+ if (dt->base + dt->nelts <= index) {
+ return NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR;
+ }
+
+ index = dt->base + dt->nelts - 1 - index;
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
"http3 ref insert dynamic[%ui] \"%V\"", index,
value);
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

fix index type when looking up dynamic table

sun edward 362 May 23, 2021 11:14PM



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

Online Users

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