------------------------------------------------------------ revno: 13065 revision-id: squid3@treenet.co.nz-20131230040238-xtd5bzvj3nopeobx parent: squid3@treenet.co.nz-20131225213607-1zrjkv81ct0nikkz fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3498 author: Alex Rousskov committer: Amos Jeffries branch nick: 3.4 timestamp: Sun 2013-12-29 21:02:38 -0700 message: Bug 3498: FTP PUT assertion Server.cc:246: 'r->body_pipe != NULL' ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20131230040238-xtd5bzvj3nopeobx # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 07c54d20541495faeee46f69be31988454977af9 # timestamp: 2013-12-30 04:02:53 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20131225213607-\ # 1zrjkv81ct0nikkz # # Begin patch === modified file 'src/ftp.cc' --- src/ftp.cc 2013-06-19 04:59:56 +0000 +++ src/ftp.cc 2013-12-30 04:02:38 +0000 @@ -3051,6 +3051,13 @@ 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;