note
salva
I am extending [mod://Net::SFTP::Server] to implement version 4 of the SFTP protocol. That version supports opening files in TEXT mode (similar to FTP) and there are two ways to do it, first one is to convert the native new-lines to CRLF before sending through the network and the second one is to tell the client what the native newline sequence is and let it handle the burden of the conversion.
<p>At this point, it seems to me that the simple solution is the first one letting Perl read the file in text mode and then applying <c>s/\n/\r\n/</c>. This may be slightly incorrect in some edge cases (for instance, files on Windows with <c>\n</c> line endings) that nobody would care about so I don't either!
971815
971831