From: Steve Holme Date: Sun, 15 Sep 2013 19:19:23 +0000 (+0100) Subject: ftpserver.pl: Added the ability to include spaces in capabilities X-Git-Tag: curl-7_33_0~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=016879d477300656c764a72ec4c7c3c616cee8f2;p=thirdparty%2Fcurl.git ftpserver.pl: Added the ability to include spaces in capabilities For example: CAPA "SIZE 1048576" 8BITMIME BINARYMIME will populate the capabilities list with the following in: SIZE 1048576 8BITMIME BINARYMIME --- diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 74cf9f230e..0975a20dd2 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -2639,7 +2639,10 @@ sub customize { } elsif($_ =~ /CAPA (.*)/) { logmsg "FTPD: instructed to support CAPABILITY command\n"; - @capabilities = split(/ /, $1); + @capabilities = split(/ (?!(?:[^" ]|[^"] [^"])+")/, $1); + foreach (@capabilities) { + $_ = $1 if /^"(.*)"$/; + } } elsif($_ =~ /AUTH (.*)/) { logmsg "FTPD: instructed to support AUTHENTICATION command\n";