From: Alex Rousskov Date: Sun, 29 Dec 2013 15:56:02 +0000 (-0800) Subject: Bug 3498: FTP PUT assertion Server.cc:246: "r->body_pipe != NULL" X-Git-Tag: SQUID_3_5_0_1~447 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccc927f9204159637bc77820fbb3f36521a54c86;p=thirdparty%2Fsquid.git Bug 3498: FTP PUT assertion Server.cc:246: "r->body_pipe != NULL" --- diff --git a/src/ftp.cc b/src/ftp.cc index f4b1080809..71f3d30359 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -3051,6 +3051,13 @@ void FtpStateData::readStor() debugs(9, 3, HERE); if (code == 125 || (code == 150 && Comm::IsConnOpen(data.conn))) { + if (!originalRequest()->body_pipe) { + debugs(9, 3, "zero-size STOR?"); + state = WRITING_DATA; // make ftpWriteTransferDone() responsible + dataComplete(); // XXX: keep in sync with doneSendingRequestBody() + return; + } + if (!startRequestBodyFlow()) { // register to receive body data ftpFail(this); return;