]> 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>
Mon, 30 Dec 2013 04:02:38 +0000 (21:02 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 30 Dec 2013 04:02:38 +0000 (21:02 -0700)
src/ftp.cc

index fb320b0664587d1e243e353174d1b922c704f377..50df61c3c3881dad4cb5a379a3761b07625e1f61 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;