]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
send old entry if IMS request results in 500's status
authorwessels <>
Tue, 12 Jan 1999 03:16:04 +0000 (03:16 +0000)
committerwessels <>
Tue, 12 Jan 1999 03:16:04 +0000 (03:16 +0000)
src/client_side.cc

index 05287f58a71f8a45343c81abaf1220a5a67d50d7..f79f9ee6b3b8d72d29887a0b55d4131e688d468a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.427 1999/01/11 16:50:29 wessels Exp $
+ * $Id: client_side.cc,v 1.428 1999/01/11 20:16:04 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -334,6 +334,12 @@ clientGetsOldEntry(StoreEntry * new_entry, StoreEntry * old_entry, request_t * r
        debug(33, 5) ("clientGetsOldEntry: YES, broken HTTP reply\n");
        return 1;
     }
+    /* If the reply is a failure then send the old object as a last
+     * resort */
+    if (status >= 500 && status < 600) {
+       debug(33, 2) ("clientGetsOldEntry: YES, failure reply=%d\n", status);
+       return 1;
+    }
     /* If the reply is anything but "Not Modified" then
      * we must forward it to the client */
     if (HTTP_NOT_MODIFIED != status) {