summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2018-02-16 13:34:35 +0000
committerGraham Leggett <minfrin@apache.org>2018-02-16 13:34:35 +0000
commitc327f16fbb61f80bf6888794db7a15760f9f0546 (patch)
treec63a3d542ba117d4216a118007bab6cf6aeed8d2
parentcb6a0c1c43aaa86495561d22be6b1595547939af (diff)
downloadhttpd-c327f16fbb61f80bf6888794db7a15760f9f0546.tar.gz
*) mod_cache_socache: Fix caching of empty headers up to carriage return.
trunk patch: http://svn.apache.org/r1824343 2.4.x patch: trunk works (modulo CHANGES) +1: ylavic, rpluem, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1824475 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--STATUS4
-rw-r--r--modules/cache/mod_cache_socache.c3
3 files changed, 5 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index edcf422001..14b8cc6eb5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.4.30
+ *) mod_cache_socache: Fix caching of empty headers up to carriage return.
+ [Yann Ylavic]
+
*) core: For consistency, ensure that read lines are NUL terminated on any
error, not only on buffer full. [Yann Ylavic]
diff --git a/STATUS b/STATUS
index ff3bcaea8d..9ec4ff6acf 100644
--- a/STATUS
+++ b/STATUS
@@ -118,10 +118,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
[ start all new proposals below, under PATCHES PROPOSED. ]
- *) mod_cache_socache: Fix caching of empty headers up to carriage return.
- trunk patch: http://svn.apache.org/r1824343
- 2.4.x patch: trunk works (modulo CHANGES)
- +1: ylavic, rpluem, minfrin
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
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