Listing a current directory (when the path argument is empty)
would send the command "LIST " with trailing whitespace to FTP
resulting in 500 errors with Solaris FTP server.
This patch fixes that.
Some servers require the user to be logged in to run FEAT
ftp://serverftp:2121: Connecting to FTP server
FTP Rx: "220 DrFTPD+ 2.0 (+STABLE+) $Revision: 1949 $ http://drftpd.org"
FTP Tx: "AUTH TLS"
FTP Rx: "234 AUTH TLS successful"
FTP Tx: "FEAT"
FTP Rx: "530 Not logged in."
This commit
4a68979b89 always return the ReadResponse error after an upload
Broke the error return from Stor(). If you attempt to upload a file
with Stor() and the io.Reader that you passed in returns an error,
this was not returned by the Stor() command leading the user to think
the file was uploaded correctly.
This was detected by rclone's unit tests and the exact commit was
pinpointed with git commit.
This commit fixes it by returning the error from io.Copy or the error
from ReadResponse - the latter if they are both set.
Fixes#198
if the upload failed we still need to try to read the server
response otherwise if the failure is not due to a connection problem,
for example the server denied the upload for quota limits, we miss
the response and we cannot use the connection to send other commands
Here is what happen before this patch:
C->S STOR test_file1.dat
S->C 150 Using transfer connection
S->C 550 Could not transfer file: denying write due to space limit
the client does not read the above 550 response and send the next command, so
the response for the STOR response will be readed as response for the next
command
pure-ftpd 1.0.49-4 as supplied as part of Ubuntu 20.04 advertises UTF8
support in the FEAT command but the OPTS command fails to turn it on.
OPTS UTF8 ON
504 Unknown command
This patch introduces a workaround to ignore the error which enables
this library to work with this version of pure-ftpd. Filezilla appears
to ignore this error in a similar way.