mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 09:21:50 -05:00
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).
This commit is contained in:
parent
480ca49ecb
commit
ca9ab24ed5
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user