From: Amos Jeffries Date: Sat, 13 Dec 2008 03:19:10 +0000 (+1300) Subject: Merge from trunk X-Git-Tag: SQUID_3_2_0_1~1255^2~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=788480fa519df650bcf83a4bbf35252b1598bfc5;p=thirdparty%2Fsquid.git Merge from trunk --- 788480fa519df650bcf83a4bbf35252b1598bfc5 diff --cc src/ftp.cc index 68bb44818c,c8c67962e4..781dc67b88 --- a/src/ftp.cc +++ b/src/ftp.cc @@@ -576,15 -660,21 +572,14 @@@ FtpStateData::listingFinish( const char *path = flags.dir_slash ? filepath : "."; printfReplyBody("[As extended directory]\n", rfc1738_escape_part(path)); } - - printfReplyBody("
\n"); - printfReplyBody("
\n"); - printfReplyBody("Generated %s by %s (%s)\n", - mkrfc1123(squid_curtime), - getMyHostname(), - visible_appname_string); - printfReplyBody("
\n"); } +#endif /* DEAD_CODE */ /// \ingroup ServerProtocolFTPInternal - static const char *Month[] = - { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" - }; + static const char *Month[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" + }; /// \ingroup ServerProtocolFTPInternal static int @@@ -1238,18 -1407,17 +1229,16 @@@ FtpStateData::processReplyBody( #endif - if (flags.isdir && !flags.listing_started) - listingStart(); - if (flags.isdir) { - + flags.listing = 1; + listing.reset(); parseListing(); - } else - if (const int csize = data.readBuf->contentSize()) { - writeReplyBody(data.readBuf->content(), csize); - debugs(9, 5, HERE << "consuming " << csize << " bytes of readBuf"); - data.readBuf->consume(csize); - } + return; - + } else if (const int csize = data.readBuf->contentSize()) { + writeReplyBody(data.readBuf->content(), csize); + debugs(9, 5, HERE << "consuming " << csize << " bytes of readBuf"); + data.readBuf->consume(csize); + } entry->flush();