]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
only generate an error page if inmem_hi == 0
authorwessels <>
Fri, 5 Dec 1997 06:06:45 +0000 (06:06 +0000)
committerwessels <>
Fri, 5 Dec 1997 06:06:45 +0000 (06:06 +0000)
src/gopher.cc

index e83eb20874bc5c809d0ce4105f47f32722c95972..fc9379c1d449e9a56d789831b575f62b6e031e5e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: gopher.cc,v 1.115 1997/12/03 09:00:18 wessels Exp $
+ * $Id: gopher.cc,v 1.116 1997/12/04 23:06:45 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -652,7 +652,7 @@ gopherTimeout(int fd, void *data)
        err->url = xstrdup(gopherState->request);
        errorAppendEntry(entry, err);
     } else {
-        storeAbort(entry, 0);
+       storeAbort(entry, 0);
     }
     comm_close(fd);
 }
@@ -692,14 +692,16 @@ gopherReadReply(int fd, void *data)
        debug(50, 1) ("gopherReadReply: error reading: %s\n", xstrerror());
        if (ignoreErrno(errno)) {
            commSetSelect(fd, COMM_SELECT_READ, gopherReadReply, data, 0);
-       } else {
-           /* was  assert */
+       } else if (entry->mem_obj->inmem_hi == 0) {
            ErrorState *err;
            err = errorCon(ERR_READ_ERROR, HTTP_INTERNAL_SERVER_ERROR);
            err->xerrno = errno;
            err->url = xstrdup(storeUrl(entry));
            errorAppendEntry(entry, err);
            comm_close(fd);
+       } else {
+           storeAbort(entry, 0);
+           comm_close(fd);
        }
     } else if (len == 0 && entry->mem_obj->inmem_hi == 0) {
        ErrorState *err;