]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3498: FTP PUT assertion Server.cc:246: "r->body_pipe != NULL"
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 29 Dec 2013 15:56:02 +0000 (07:56 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 29 Dec 2013 15:56:02 +0000 (07:56 -0800)
src/ftp.cc

index f4b108080936ff6056e3a9ec42bd5e8ed6af10a6..71f3d30359c9eac31a75c435512f6da94493fea2 100644 (file)
@@ -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;