diff options
author | Graham Leggett <minfrin@apache.org> | 2018-02-16 13:34:35 +0000 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2018-02-16 13:34:35 +0000 |
commit | c327f16fbb61f80bf6888794db7a15760f9f0546 (patch) | |
tree | c63a3d542ba117d4216a118007bab6cf6aeed8d2 | |
parent | cb6a0c1c43aaa86495561d22be6b1595547939af (diff) | |
download | httpd-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-- | CHANGES | 3 | ||||
-rw-r--r-- | STATUS | 4 | ||||
-rw-r--r-- | modules/cache/mod_cache_socache.c | 3 |
3 files changed, 5 insertions, 5 deletions
@@ -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] @@ -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 |