mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Latorre <dvl...@gmail.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 Wed, 27 May 2009 13:07:43 GMT
I added a fix and some tests but ToNetASCIIOutputStream in
commons-util will always replace to \r\n so I'm uploading a modified
version. With this fix ascii mode should not eat line separators
anymore.




2009/5/26 Niklas Gustavsson <niklas@protocol7.com>:
> 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