
If it is Microsoft Windows, nothing has to be removed, while on Unix the superfluous CR is removed and on legacy MacOS the unneeded LF. The server then adjusts the line ending again to what is used on the platform the server runs at. Therefore it has to add nothing (on Microsoft Windows), add CR (on Unix) or add LF (on legacy MacOS) to each line ending. So in case the file is transferred from the client to the server, the client has to make sure CR+LF is used.

According to the FTP specification, ASCII files are always transferred using a CR+LF pair as line ending. The purpose of ASCII type is to ensure that line endings are properly changed to what is right on the platform. Microsoft Windows for example uses a CR+LF pair (carriage return and line feed), while Unix(-like) systems, including Linux and MacOS X, only use LF and traditional MacOS systems (MacOS 9 or older) only use CR. The problem with text files is that different platforms have different kinds of line endings.

