]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add support for FTP MLSD and MLST commands (RFC 3659)
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 23 Dec 2013 16:42:45 +0000 (18:42 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 23 Dec 2013 16:42:45 +0000 (18:42 +0200)
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.

src/FtpServer.cc
src/client_side.cc

index 5b3a84c0096e960e85a7f94c990363502d7d23c5..c0d735954a510a81c088b1507e0bb58c91960ead 100644 (file)
@@ -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<String> pathCommands(pathCommandsStr, pathCommandsStr + sizeof(pathCommandsStr)/sizeof(pathCommandsStr[0]));
     return pathCommands.find(cmd) != pathCommands.end();
 }
index fb675f9005e027d99cb397b43c30875e81fc7060..ee411dfe6daabaa5b220660c9985356d1d0f2352 100644 (file)
@@ -5814,6 +5814,7 @@ FtpHandleRequest(ClientSocketContext *context, String &cmd, String &params) {
     static std::pair<const char *, FtpRequestHandler *> 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),