[nginx] HTTP/3: fixed NGX_HTTP_V3_VARLEN_INT_LEN value.
noreply at nginx.com
noreply at nginx.com
Fri Apr 18 11:29:02 UTC 2025
details: https://github.com/nginx/nginx/commit/0f9f43b79eed64ab1a876be76ff0f49d499784fc
branches: master
commit: 0f9f43b79eed64ab1a876be76ff0f49d499784fc
user: Roman Arutyunyan <arut at nginx.com>
date: Fri, 18 Apr 2025 11:16:57 +0400
description:
HTTP/3: fixed NGX_HTTP_V3_VARLEN_INT_LEN value.
After fixing ngx_http_v3_encode_varlen_int() in 400eb1b628,
NGX_HTTP_V3_VARLEN_INT_LEN retained the old value of 4, which is
insufficient for the values over 1073741823 (1G - 1).
The NGX_HTTP_V3_VARLEN_INT_LEN macro is used in ngx_http_v3_uni.c to
format stream and frame types. Old buffer size is enough for formatting
this data. Also, the macro is used in ngx_http_v3_filter_module.c to
format output chunks and trailers. Considering output_buffers and
proxy_buffer_size are below 1G in all realistic scenarios, the old buffer
size is enough here as well.
---
src/http/v3/ngx_http_v3.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/http/v3/ngx_http_v3.h b/src/http/v3/ngx_http_v3.h
index 9dcb5e6a7..8fd212c1f 100644
--- a/src/http/v3/ngx_http_v3.h
+++ b/src/http/v3/ngx_http_v3.h
@@ -23,7 +23,7 @@
#define NGX_HTTP_V3_HQ_ALPN_PROTO "\x0Ahq-interop"
#define NGX_HTTP_V3_HQ_PROTO "hq-interop"
-#define NGX_HTTP_V3_VARLEN_INT_LEN 4
+#define NGX_HTTP_V3_VARLEN_INT_LEN 8
#define NGX_HTTP_V3_PREFIX_INT_LEN 11
#define NGX_HTTP_V3_STREAM_CONTROL 0x00
More information about the nginx-devel
mailing list