node-ftp icon indicating copy to clipboard operation
node-ftp copied to clipboard

Support return code 200 for authentication

Open patrickjuchli opened this issue 8 years ago • 0 comments

VxWorks FTP Server is used in many embedded devices and returns 200 (not 234) when accepting authentication using “AUTH TLS” or “AUTH SSL”.

This pull request will accept a return code of 200. Here is an example with VxWorks FTP Server:

[connection] < '220 VxWorks FTP server (VxWorks VxWorks5.5.1) ready.\r\n'
[parser] < '220 VxWorks FTP server (VxWorks VxWorks5.5.1) ready.\r\n'
[parser] Response: code=220, buffer='VxWorks FTP server (VxWorks VxWorks5.5.1) ready.'
[connection] > 'AUTH TLS'
[connection] < '200 AUTH command ok; starting SSL connection...\r\n'
[parser] < '200 AUTH command ok; starting SSL connection...\r\n'
[parser] Response: code=200, buffer='AUTH command ok; starting SSL connection...'

According to Wikipedia's list of FTP return codes, the return code 234 is nonstandard. Maybe that will make it easier for node-ftp to accept 200 as well?

patrickjuchli avatar Jan 17 '17 08:01 patrickjuchli