From: Chuck Murcko Date: Mon, 24 Sep 2001 20:14:27 +0000 (+0000) Subject: Fixes problems with origin server connection close if client dies X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a982f4046ade800fc96739036a99b15ca52985a3;p=thirdparty%2Fapache%2Fhttpd.git Fixes problems with origin server connection close if client dies Fixes CacheForceCompletion directive PR: 7383, 8067, 8090 Obtained from: Alexey Panchenko Submitted by: Alexey Panchenko Reviewed by: Chuck Murcko git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@91128 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/proxy/mod_proxy.c b/src/modules/proxy/mod_proxy.c index 7e5ac3ee0cc..5e44bcd4ffd 100644 --- a/src/modules/proxy/mod_proxy.c +++ b/src/modules/proxy/mod_proxy.c @@ -856,7 +856,7 @@ static const char* if (s > 0) psf->cache.cache_completion = ((float)s / 100); - psf->cache.cache_completion = 1; + psf->cache.cache_completion_set = 1; return NULL; } diff --git a/src/modules/proxy/proxy_util.c b/src/modules/proxy/proxy_util.c index 99717beb6ea..bbadcd62600 100644 --- a/src/modules/proxy/proxy_util.c +++ b/src/modules/proxy/proxy_util.c @@ -588,7 +588,7 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c) ap_reset_timeout(r); if (w <= 0) { - if (c != NULL && c->fp != NULL) { + if (c != NULL) { /* when a send failure occurs, we need to decide * whether to continue loading and caching the * document, or to abort the whole thing @@ -598,8 +598,10 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c) (c->len * c->cache_completion < total_bytes_rcvd); if (! ok) { + if (c->fp!=NULL) { ap_pclosef(c->req->pool, ap_bfileno(c->fp, B_WR)); c->fp = NULL; + } unlink(c->tempfile); c = NULL; }