From: Christos Tsantilas Date: Mon, 23 Dec 2013 16:42:45 +0000 (+0200) Subject: Add support for FTP MLSD and MLST commands (RFC 3659) X-Git-Tag: SQUID_3_5_0_1~117^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45880cbd1e9c8a03d6c5ab41c13dd7ed8856575c;p=thirdparty%2Fsquid.git Add support for FTP MLSD and MLST commands (RFC 3659) FileZilla is a popular FTP clients supporting that command (via FEAT detection). It will use MLSD instead of LIST if the server claims support for MLST and/or MLSD command. --- diff --git a/src/FtpServer.cc b/src/FtpServer.cc index 5b3a84c009..c0d735954a 100644 --- a/src/FtpServer.cc +++ b/src/FtpServer.cc @@ -1208,7 +1208,7 @@ Ftp::hasPathParameter(const String &cmd) { static const char *pathCommandsStr[]= {"CWD","SMNT", "RETR", "STOR", "APPE", "RNFR", "RNTO", "DELE", "RMD", "MKD", - "LIST", "NLST", "STAT"}; + "LIST", "NLST", "STAT", "MLSD", "MLST"}; static const std::set pathCommands(pathCommandsStr, pathCommandsStr + sizeof(pathCommandsStr)/sizeof(pathCommandsStr[0])); return pathCommands.find(cmd) != pathCommands.end(); } diff --git a/src/client_side.cc b/src/client_side.cc index fb675f9005..ee411dfe6d 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -5814,6 +5814,7 @@ FtpHandleRequest(ClientSocketContext *context, String &cmd, String ¶ms) { static std::pair handlers[] = { std::make_pair("LIST", FtpHandleDataRequest), std::make_pair("NLST", FtpHandleDataRequest), + std::make_pair("MLSD", FtpHandleDataRequest), std::make_pair("FEAT", FtpHandleFeatRequest), std::make_pair("PASV", FtpHandlePasvRequest), std::make_pair("PORT", FtpHandlePortRequest),