mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Gustavsson <nik...@protocol7.com>
Subject Re: [jira] Commented: (FTPSERVER-306) some clients won't transform NEW LINE characters to \r\n when sending in ASCII mode so after sending a file the new lines will be gone.
Date Tue, 26 May 2009 10:53:39 GMT
On Tue, May 26, 2009 at 12:38 PM, Sai Pullabhotla
<sai.pullabhotla@jmethods.com> wrote:
>>> when FtpServer receives a file in ASCII mode our current code replaces \r
> for \r\n and ignores \n, but since it seems FileZilla
>>> doesn't transform new lines to \r\n  we will never find a \r and the new
> line characters will be silently ignored.
>
> Hmm... shouldn't it be just doing the following:
>
> 1. Replace \r\n with System.getProperty("line.separator");
> 2. Write everything else as is.

Agreed. However, that's not what we currently do since if the client
only sends \n we will strip out the line ending. This is a bug on our
side that we should fix. You can probably agrue that FileZilla is
doing the right thing as \r is probably not to be regarded as the
"internal character representation" (as described in the RFC) on
Windows.

Anyways, we should add a bunch of tests for this and fix.

/niklas

Mime
View raw message