Summary
When \DisableASCIIConversion\ is enabled, \handleSIZE\ already allows \SIZE\ in ASCII mode (see handle_files.go around line 404), because transfers are byte-for-byte. However \handleREST\ still unconditionally rejects \REST\ in ASCII (\TYPE A) mode with:
\
501 Resuming transfers not allowed in ASCII mode
\\
Why it matters
IoT/embedded FTP clients often connect with \TYPE A\ and send \REST 0\ to probe/resume uploads (e.g. dataloggers behind NAT with flaky connectivity). With conversion disabled the offset is byte-accurate, so rejecting \REST\ in ASCII mode forces the client to retry from scratch or fall back to binary mode — and on some firmware, the \501\ makes the client abort the whole upload session.
Expected behavior
When \Settings.DisableASCIIConversion == true, \REST\ in ASCII mode should be accepted (matching how \SIZE\ is already handled), and only rejected when conversion is still enabled.
Environment
- ftpserverlib v0.32.1
- Go 1.26
Proposed fix: condition \handleREST's ASCII-mode rejection on !c.server.settings.DisableASCIIConversion.
Summary
When \DisableASCIIConversion\ is enabled, \handleSIZE\ already allows \SIZE\ in ASCII mode (see handle_files.go around line 404), because transfers are byte-for-byte. However \handleREST\ still unconditionally rejects \REST\ in ASCII (\TYPE A) mode with:
\
501 Resuming transfers not allowed in ASCII mode
\\
Why it matters
IoT/embedded FTP clients often connect with \TYPE A\ and send \REST 0\ to probe/resume uploads (e.g. dataloggers behind NAT with flaky connectivity). With conversion disabled the offset is byte-accurate, so rejecting \REST\ in ASCII mode forces the client to retry from scratch or fall back to binary mode — and on some firmware, the \501\ makes the client abort the whole upload session.
Expected behavior
When \Settings.DisableASCIIConversion == true, \REST\ in ASCII mode should be accepted (matching how \SIZE\ is already handled), and only rejected when conversion is still enabled.
Environment
Proposed fix: condition \handleREST's ASCII-mode rejection on !c.server.settings.DisableASCIIConversion.