]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_http2: use length supplied by nghttp2 to check trailers.
authorStefan Eissing <icing@apache.org>
Tue, 4 Nov 2025 15:49:44 +0000 (15:49 +0000)
committerStefan Eissing <icing@apache.org>
Tue, 4 Nov 2025 15:49:44 +0000 (15:49 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1929517 13f79535-47bb-0310-9956-ffa450edef68

modules/http2/h2_util.c

index 2b2375a1d908abe498fdfd1a61903a84c80f427c..8c1597dadc5732f1f9a4262fad9d88e2c90073f3 100644 (file)
@@ -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));
 }