From: Ruediger Pluem Date: Wed, 29 Dec 2010 10:09:43 +0000 (+0000) Subject: * mod_mem_cache: Add a debug msg when a streaming response exceeds X-Git-Tag: 2.2.18~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efe338326520d00c78b3a37714f5fef51322d2f3;p=thirdparty%2Fapache%2Fhttpd.git * mod_mem_cache: Add a debug msg when a streaming response exceeds MCacheMaxStreamingBuffer, since mod_cache will follow up with a scary 'memory allocation failed' debug message. PR: 49604 Submitted by: covener Reviewed by: covener, poirier, rpluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1053597 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index a0cc2d68a2a..6c62e206020 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,10 @@ -*- coding: utf-8 -*- Changes with Apache 2.2.18 + *) mod_mem_cache: Add a debug msg when a streaming response exceeds + MCacheMaxStreamingBuffer, since mod_cache will follow up with a scary + 'memory allocation failed' debug message. PR 49604. [Eric Covener] + *) proxy_connect: Don't give up in the middle of a CONNECT tunnel when the child process is starting to exit. PR50220. [Eric Covener] diff --git a/STATUS b/STATUS index 717b363811a..fd789dd50a2 100644 --- a/STATUS +++ b/STATUS @@ -89,13 +89,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_mem_cache: add a debug msg when a streaming response exceeds - MCacheMaxStreamingBuffer, since mod_cache will follow up with a scary - 'memory allocation failed' debug message. PR 49604 - Trunk patch: n/a mod_mem_cache not in trunk - 2.2.x: http://people.apache.org/~covener/patches/httpd-2.2.x-memcache_streaming_debug-2.diff - +1 covener, poirier, rpluem - * mod_cache: Check the request to determine whether we are allowed to return cached content at all, and respect a "Cache-Control: no-cache" header from a client. Previously, "no-cache" would diff --git a/modules/cache/mod_mem_cache.c b/modules/cache/mod_mem_cache.c index fb988915a1d..38aa8f84668 100644 --- a/modules/cache/mod_mem_cache.c +++ b/modules/cache/mod_mem_cache.c @@ -820,8 +820,11 @@ static apr_status_t store_body(cache_handle_t *h, request_rec *r, apr_bucket_bri return rv; } if (len) { - /* Check for buffer overflow */ + /* Check for buffer (max_streaming_buffer_size) overflow */ if ((obj->count + len) > mobj->m_len) { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, + "mem_cache: URL %s exceeds the MCacheMaxStreamingBuffer (%" APR_SIZE_T_FMT ") limit and will not be cached.", + obj->key, mobj->m_len); return APR_ENOMEM; } else {