From cdff9049e53a4364f92032d1aebddbd09dd7b67a Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Wed, 25 Oct 2006 15:45:22 +0000 Subject: [PATCH] Optimise the alternate case. Fail fast and stop splitting buckets if store_body is no longer being called. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467684 13f79535-47bb-0310-9956-ffa450edef68 --- modules/cache/mod_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 483b2bb562..b4022f32c8 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -338,7 +338,7 @@ static int do_store_body(cache_request_rec *cache, rv2 = APR_SUCCESS; if (conf->maxbucketsize > 0) { e = APR_BRIGADE_FIRST(in); - while (e != APR_BRIGADE_SENTINEL(in)) { + while (APR_SUCCESS == rv && e != APR_BRIGADE_SENTINEL(in)) { /* if necessary, split the brigade and send what we have so far */ if (APR_SUCCESS == apr_bucket_split(e, conf->maxbucketsize)) { -- 2.40.0