From 90fa25bddf24f53e5121bcbbe676da8fa2b8b1c5 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Sun, 29 Dec 2013 21:02:38 -0700 Subject: [PATCH] Bug 3498: FTP PUT assertion Server.cc:246: 'r->body_pipe != NULL' --- src/ftp.cc | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.47.2