From RFC959:
End-of-Line The end-of-line sequence defines the separation of printing lines. The sequence is Carriage Return, followed by Line Feed.
All text you send using FTP should have newlines as "\r\n"
, which obviously you don't have. You have to modify the text you send to the client, making sure it has correct line endings.