summaryrefslogtreecommitdiffstats
path: root/modules/cache
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 /modules/cache
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
Diffstat (limited to 'modules/cache')
-rw-r--r--modules/cache/mod_cache_socache.c3
1 files changed, 2 insertions, 1 deletions
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