Uploaded image for project: 'FtpServer'
  1. FtpServer
  2. FTPSERVER-184

IODataConnection ASCII mode does not work as expected.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0-M2, 1.0.0-M3
    • 1.0.0-M4
    • Core
    • None

    Description

      New lines in files sent in ASCII mode are transformed into /r/n no matter what platform the ftp server is running on. But if I'm not wrong, the new EOL should be equal to "line.separator" . If ASCII mode is going to be supported, this ought to be changed.

      The code in IODataConnection.transfer()
      {
      if (isAscii) {
      for (int i = 0; i < count; ++i) {
      byte b = buff[i];
      if (b == '\n' && !lastWasCR)

      { bos.write('\r'); }

      if (b == '\r')

      { lastWasCR = true; }

      else

      { lastWasCR = false; }

      bos.write(b);
      }
      }
      }

      Attachments

        Activity

          People

            niklas Niklas Therning
            dlatorre David Latorre
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: