From b9f90a36a857dae04e13a5633951247c2e113288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa?= Date: Fri, 17 Jun 2022 16:28:36 +0200 Subject: [PATCH] Allow lowercase UTF8 OPTS The FTP client included in Windows Explorer sends this command in lowercase. Without this patch the server would respond with an invalid command error and the client would refuse to continue --- src/server/controlchan/line_parser/parser.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/controlchan/line_parser/parser.rs b/src/server/controlchan/line_parser/parser.rs index 6255fb73..e13e704d 100644 --- a/src/server/controlchan/line_parser/parser.rs +++ b/src/server/controlchan/line_parser/parser.rs @@ -168,10 +168,10 @@ where } match ¶ms[..] { - b"UTF8 ON" => Command::Opts { + b"UTF8 ON" | b"utf8 on" => Command::Opts { option: Opt::Utf8 { on: true }, }, - b"UTF8 OFF" => Command::Opts { + b"UTF8 OFF" | b"utf8 off" => Command::Opts { option: Opt::Utf8 { on: false }, }, _ => return Err(ParseErrorKind::InvalidCommand.into()),