Am Sonntag, 21. Dezember 2014, 05:43:09 schrieb Eli Zaretskii: > > From: Tim Rühsen <[email protected]> > > Date: Sat, 20 Dec 2014 22:16:16 +0100 > > > > > > # FTP Server has to start with english locale due to use of > > > > strftime > > > > > > > > month names in LIST command > > > > > > > > setlocale(LC_ALL, 'C'); > > > > $self->_launch_server( > > > > > > Thanks. But how can this explain the 'index.html' thingy appearing in > > > the FTP listing, instead of the expected afile.txt etc.? > > > > The .listing file can't be parsed correctly when the month names are > > incorrect. > I see. But then this is not the problem in my case. Here's the > listing I see in one of the FTP test logs: > > 226 Listing complete. Data connection has been closed. > -r--r--r-- 1 0 0 12 Dec 12:43 franτais.txt > 2014-12-19 12:43:03 (362 KB/s) - '.listing' saved [48] > > As you see, even though the file name includes non-ASCII characters, > the month name is in English (which is what I'd expect, given the > locale I have here). > > > But I know, there are a few Windows users / developers reading this. > > Maybe they can help or bring some light !? > > I certainly hope so. > > Could the problem be that the listing has a CR-LF end-of-line format? > Could that interfere with its parsing? > > Thanks.
Back to Test-ftp-bad-list.px... if you add the following line to
FTPServer.pm, you can see the difference between the GNU/Linux and the Windows
.listing. The listing has two lines, so a difference of 4 bytes (reported in
your original post) seems not to be a CRLF problem.
Also, as you can see below, even on GNU/Linux CRLF is used and not LF alone.
diff --git a/tests/FTPServer.pm b/tests/FTPServer.pm
index 3d7d8a5..261e819 100644
--- a/tests/FTPServer.pm
+++ b/tests/FTPServer.pm
@@ -134,6 +134,7 @@ sub _LIST_command
{
for my $item (@$listing)
{
+ print STDERR "$item\r\n";
print $sock "$item\r\n";
}
}
Tim
signature.asc
Description: This is a digitally signed message part.
