httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r539271 - in /httpd/httpd/branches/2.2.x: CHANGES modules/metadata/mod_headers.c
Date Fri, 18 May 2007 05:57:46 GMT
Author: jerenkrantz
Date: Thu May 17 22:57:45 2007
New Revision: 539271

URL: http://svn.apache.org/viewvc?view=rev&rev=539271
Log:
mod_headers: Allow % at the end of a Header value.  PR 36609.

(Backport of r490156, r499567)

Reviewed by: niq, rpluem, wrowe

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=539271&r1=539270&r2=539271
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu May 17 22:57:45 2007
@@ -1,6 +1,9 @@
                                                         -*- 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]
 

Modified: httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c?view=diff&rev=539271&r1=539270&r2=539271
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c Thu May 17 22:57:45 2007
@@ -305,11 +305,13 @@
     }
     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;
     }
 



Mime
View raw message