summaryrefslogtreecommitdiff
path: root/tests/ftpserver.pl
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2014-01-26 11:30:41 +0100
committerMarc Hoersken <info@marc-hoersken.de>2014-01-31 20:05:14 +0100
commitca9ab24ed5f06c87e1eb8b7530128dac02cad864 (patch)
treebcefc72b35f059a9a4116bf3c89f045fc72ca12d /tests/ftpserver.pl
parent480ca49ecbdcc61a6c837799bb550a3e52915be6 (diff)
downloadcurl-ca9ab24ed5f06c87e1eb8b7530128dac02cad864.tar.gz
ftpserver.pl: directory LISTings use [CR][LF] for ASCII transfer
According to section 2.2 of RFC959 the End-of-Line is defined as: The end-of-line sequence defines the separation of printing lines. The sequence is Carriage Return, followed by Line Feed. Verified by sniffing traffic between a Windows FTP client (FileZilla) and Unix-hosted FTP server (ProFTPD).
Diffstat (limited to 'tests/ftpserver.pl')
-rwxr-xr-xtests/ftpserver.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index f2b12ebc3..0116e2073 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -2160,6 +2160,9 @@ my @ftpdir=("total 20\r\n",
my @data = getpart("reply", "data");
for(@data) {
my $send = $_;
+ # convert all \n to \r\n for ASCII transfer
+ $send =~ s/\r\n/\n/g;
+ $send =~ s/\n/\r\n/g;
logmsg "send $send as data\n";
senddata $send;
}