summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-02-15 19:31:25 +0100
committerYann Ylavic <ylavic@apache.org>2018-02-15 19:31:25 +0100
commitc5c2bbc8ccdc7f12914f2bd820b911833fffc696 (patch)
tree7765c920913745ddef33d22ec99b01555e7992f9
parentregex: Allow to configure global/default options for regexes. (diff)
downloadapache2-c5c2bbc8ccdc7f12914f2bd820b911833fffc696.tar.xz
apache2-c5c2bbc8ccdc7f12914f2bd820b911833fffc696.zip
mod_cache_socache: Fix caching of empty headers up to carriage return.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1824343 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--modules/cache/mod_cache_socache.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 29e43e5df3..ae7117653d 100644
--- 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]
diff --git a/modules/cache/mod_cache_socache.c b/modules/cache/mod_cache_socache.c
index 11e950285d..0d76760c5b 100644
--- a/modules/cache/mod_cache_socache.c
+++ b/modules/cache/mod_cache_socache.c
@@ -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