From: Alex Rousskov Date: Mon, 30 Dec 2013 04:02:38 +0000 (-0700) Subject: Bug 3498: FTP PUT assertion Server.cc:246: 'r->body_pipe != NULL' X-Git-Tag: SQUID_3_4_2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90fa25bddf24f53e5121bcbbe676da8fa2b8b1c5;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 fb320b0664..50df61c3c3 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;