Commit 66be45bd authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

mod_headers: Allow % at the end of a Header value. PR 36609.

(Backport of r490156, r499567)

Reviewed by: niq, rpluem, wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539271 13f79535-47bb-0310-9956-ffa450edef68
parent ed2d5122
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
                                                        -*- coding: utf-8 -*-
Changes with Apache 2.2.5
  *) mod_headers: Allow % at the end of a Header value.  PR 36609.
     [Nick Kew, Ruediger Pluem]
  *) mod_cache: Use the same cache key throughout the whole request processing
     to handle escaped URLs correctly.  PR 41475. [Ruediger Pluem]
+5 −3
Original line number Diff line number Diff line
@@ -305,11 +305,13 @@ 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;
        if (*s)
            s++;
        *sa = s;
        return NULL;
    }