]> granicus.if.org Git - apache/commitdiff
mod_cache_socache: Fix caching of empty headers up to carriage return.
authorYann Ylavic <ylavic@apache.org>
Thu, 15 Feb 2018 18:31:25 +0000 (18:31 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 15 Feb 2018 18:31:25 +0000 (18:31 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824343 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/mod_cache_socache.c

diff --git a/CHANGES b/CHANGES
index 29e43e5df3de029e4618cb3805d600e61117b680..ae7117653d31035e3e07d4a0d819ad6ff709bb40 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_cache_socache: Fix caching of empty headers up to carriage return.
+     [Yann Ylavic]
+
   *) regex: Allow to configure global/default options for regexes, like
      caseless matching or extended format.  [Yann Ylavic]
 
index 11e950285d3533f6829129e3b65de4f937d14be3..0d76760c5bae7f78fd25a8a91e34849030366bab 100644 (file)
@@ -213,7 +213,8 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
                         "Premature end of cache headers.");
                 return APR_EGENERAL;
             }
-            while (apr_isspace(buffer[colon])) {
+            /* Do not go past the \r from above as apr_isspace('\r') is true */
+            while (apr_isspace(buffer[colon]) && (colon < *slider)) {
                 colon++;
             }
             apr_table_addn(table, apr_pstrndup(r->pool, (const char *) buffer