[Bug] `OPTS MLST type;...` command may have multiple responses.
See original GitHub issueDescribe the bug While experimenting with adding implicit connection support, some request and response messages got out of sync at this point:
await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;") // Make sure MLSD listings include all we can parse
Which for my server responded twice with:
< 500 Unknown option: MLST
< 500 Unknown option: OPTS UTF8 type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
Console output
The . RESOLVED: ...
lines below indicate that the task was marked resolved at that point. However I added a 1 second delay before it actually finished with setTimeout(() => resolvePromise(...args), 1000)
...
> OPTS UTF8 ON
< 200 OK.
. RESOLVED: OPTS UTF8 ON
> OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
. RESOLVED: OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
< 500 Unknown option: MLST
< 500 Unknown option: OPTS UTF8 type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
> PBSZ 0
< 200 OK.
...
Without the 1 second delay then this is the result.
...
> OPTS UTF8 ON
< 200 OK.
. RESOLVED: OPTS UTF8 ON
> OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
< 500 Unknown option: MLST
. RESOLVED: OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
> PBSZ 0
< 500 Unknown option: OPTS UTF8 type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;
. RESOLVED: PBSZ 0
> PROT P
< 200 OK.
. RESOLVED: PROT P
...
Which version of Node.js are you using? e.g. Node 12.14.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
FTP Commands: APPE, MLSD, MLST, LIST, RETR, STOR, ...
This article explains the use of FTP commands: · APPE FTP command · MLSD FTP command · MLST FTP command · LIST FTP...
Read more >Extensions to FTP RFC 3659
When the MLST command is supported, as indicated in the response to the FEAT command [6], pathnames are to be transferred in one...
Read more >RFC 2389: Feature negotiation mechanism for the File ...
6 4 The OPTS Command . ... Two new commands are added: "FEAT" and "OPTS". ... set for use in various commands and...
Read more >Command-line syntax overview for System.CommandLine
Arguments can have expected types, and System.CommandLine displays an error message if an argument can't be parsed into the expected type.
Read more >Results-Reports Visualizations
Embedded data fields don't have multiple data source options, but the type of data captured in the field can affect what types of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@patrickjuchli Thank you for the helping with this use-case.
I combined the workaround for the ShareFile server and the Implicit Encryption support in #121.
Example:
Functions:
I will close this issue because this is a bug with the FTP server and not this library. I’ve also shown a way how to handle this specific case.