aboutsummaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-09-15 20:19:23 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-09-15 20:56:16 +0100
commit016879d477300656c764a72ec4c7c3c616cee8f2 (patch)
treed4f8ebf986d3ea3eb336b482a33c1e4fb23f116f /tests/ftpserver.pl
parentc03335ec68356f7c4a620666547f17ef132cb26e (diff)
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
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 74cf9f230..0975a20dd 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";