]> granicus.if.org Git - apache/commitdiff
PR#36609 - permit % as the last character of a Header value
authorNick Kew <niq@apache.org>
Mon, 25 Dec 2006 17:40:10 +0000 (17:40 +0000)
committerNick Kew <niq@apache.org>
Mon, 25 Dec 2006 17:40:10 +0000 (17:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@490156 13f79535-47bb-0310-9956-ffa450edef68

modules/metadata/mod_headers.c

index 34174a1809c943f784b13ef4bb4bf11fc957ac5a..c7b2fc5d348c1619cdc6093e2b3b20b162a15049 100644 (file)
@@ -305,8 +305,8 @@ static char *parse_format_tag(apr_pool_t *p, format_tag *tag, const char **sa)
     }
     s++; /* skip the % */
 
-    /* Pass through %% as % */
-    if (*s == '%') {
+    /* Pass through %% or % at end of string as % */
+    if ((*s == '%') || (*s == '\0')) {
         tag->func = constant_item;
         tag->arg = "%";
         *sa = ++s;