From: wessels <> Date: Mon, 23 Apr 2007 13:29:57 +0000 (+0000) Subject: Fix "store_status == STORE_PENDING" assertion in FTP with large responses X-Git-Tag: SQUID_3_0_PRE6~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35f269984076c6649d5fed3e52592b60c2671e6b;p=thirdparty%2Fsquid.git Fix "store_status == STORE_PENDING" assertion in FTP with large responses An FTP object that exceeds reply_body_max_size leads to an assertion failure. The StoreEntry is aborted by the call to appendSuccessHeader(), but the abort callback is delayed due to using events. We need to check for ENTRY_ABORTED (again) right after the appendSuccessHeader() call -- yuck. --- diff --git a/src/ftp.cc b/src/ftp.cc index e3abb61225..302b14aebc 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.414 2007/04/21 07:14:14 wessels Exp $ + * $Id: ftp.cc,v 1.415 2007/04/23 07:29:57 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1323,6 +1323,15 @@ FtpStateData::processReplyBody() if (!flags.http_header_sent && data.readBuf->contentSize() >= 0) appendSuccessHeader(); + if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { + /* + * probably was aborted because content length exceeds one + * of the maximum size limits. + */ + abortTransaction("entry aborted after calling appendSuccessHeader()"); + return; + } + #if ICAP_CLIENT if (icapAccessCheckPending) {