From: Graham Leggett Date: Wed, 25 Oct 2006 15:45:22 +0000 (+0000) Subject: Optimise the alternate case. Fail fast and stop splitting buckets if X-Git-Tag: 2.3.0~2046 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdff9049e53a4364f92032d1aebddbd09dd7b67a;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 483b2bb5623..b4022f32c8e 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)) {