From: Stefan Eissing Date: Tue, 4 Nov 2025 15:49:44 +0000 (+0000) Subject: mod_http2: use length supplied by nghttp2 to check trailers. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe33bd5637aa7a5e0390db263ecf68d49764c33e;p=thirdparty%2Fapache%2Fhttpd.git 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 --- 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)); }