FtpServer
  1. FtpServer
  2. FTPSERVER-184

IODataConnection ASCII mode does not work as expected.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-M2, 1.0.0-M3
    • Fix Version/s: 1.0.0-M4
    • Component/s: Core
    • Labels:
      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);
      }
      }
      }

        Activity

          People

          • Assignee:
            Niklas Gustavsson
            Reporter:
            David Latorre
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development