From fe33bd5637aa7a5e0390db263ecf68d49764c33e Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 4 Nov 2025 15:49:44 +0000 Subject: [PATCH] mod_http2: use length supplied by nghttp2 to check trailers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1929517 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/http2/h2_util.c b/modules/http2/h2_util.c index 2b2375a1d9..8c1597dadc 100644 --- a/modules/http2/h2_util.c +++ b/modules/http2/h2_util.c @@ -1677,7 +1677,7 @@ int h2_ignore_req_trailer(const char *name, size_t len) nghttp2_nv nv; nv.name = (uint8_t*)name; - nv.namelen = strlen(name); + nv.namelen = len; return (h2_req_ignore_header(&nv) || contains_name(H2_LIT_ARGS(IgnoredRequestTrailers), &nv)); } @@ -1687,7 +1687,7 @@ int h2_ignore_resp_trailer(const char *name, size_t len) nghttp2_nv nv; nv.name = (uint8_t*)name; - nv.namelen = strlen(name); + nv.namelen = len; return (contains_name(H2_LIT_ARGS(IgnoredResponseHeaders), &nv) || contains_name(H2_LIT_ARGS(IgnoredResponseTrailers), &nv)); } -- 2.47.3