]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
assertion failed: forward.c:607: "e->store_status == STORE_PENDING".
authorwessels <>
Tue, 9 Jan 2001 06:32:21 +0000 (06:32 +0000)
committerwessels <>
Tue, 9 Jan 2001 06:32:21 +0000 (06:32 +0000)
In ftpSendPasv() we call fwdComplete() for HEAD requests.  I'm
seeing some of these requests get aborted after reading on the
control connection, and before calling fwdComplete().  Since the
entry was aborted, its store_status is already set to STORE_OK
and we get the assertion by calling fwdComplete() on this entry.

src/ftp.cc

index 19d4d8612c695325293a0f7fdfb1c1c3b8da1c52..5fa938713e60fc8fcc3ec4bf25eb40b199c6f623 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.305 2001/01/07 23:36:38 hno Exp $
+ * $Id: ftp.cc,v 1.306 2001/01/08 23:32:21 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -1651,7 +1651,13 @@ ftpSendPasv(FtpStateData * ftpState)
        /* Terminate here for HEAD requests */
        ftpAppendSuccessHeader(ftpState);
        storeTimestampsSet(ftpState->entry);
-       fwdComplete(ftpState->fwd);
+       /*
+        * On rare occasions I'm seeing the entry get aborted after
+        * ftpReadControlReply() and before here, probably when
+        * trying to write to the client.
+        */
+       if (!EBIT_TEST(ftpState->entry->flags, ENTRY_ABORTED))
+           fwdComplete(ftpState->fwd);
        ftpSendQuit(ftpState);
        return;
     }