]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fixes problems with origin server connection close if client dies
authorChuck Murcko <chuck@apache.org>
Mon, 24 Sep 2001 20:14:27 +0000 (20:14 +0000)
committerChuck Murcko <chuck@apache.org>
Mon, 24 Sep 2001 20:14:27 +0000 (20:14 +0000)
Fixes CacheForceCompletion directive
PR: 7383, 8067, 8090
Obtained from:  Alexey Panchenko <panchenko@liwest.ru>
Submitted by: Alexey Panchenko <panchenko@liwest.ru>
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

src/modules/proxy/mod_proxy.c
src/modules/proxy/proxy_util.c

index 7e5ac3ee0cc953d9d922c6b3b52a5c5e7c4fe82d..5e44bcd4ffdadeeb8b2bfeb3d90325d51a3305e4 100644 (file)
@@ -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;    
 }
 
index 99717beb6eaf03f32a56ce54890ab2b64d6cb1d9..bbadcd6260013207f0e231ad0a7f45e0ae1d6793 100644 (file)
@@ -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;
                     }