Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

Fix data transfer error code #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

simon3z
Copy link
Contributor

@simon3z simon3z commented Nov 13, 2016

I believe that when the file transfer fails, the error is permanent 5xx. Some clients (e.g. lftp) at the moment are confused by the temporary 4xx error and they retry to upload the file.

@lunny
Copy link
Member

lunny commented Nov 14, 2016

according http://cr.yp.to/ftp/stor.html, maybe 550 is not a correct response.

Signed-off-by: Federico Simoncelli <[email protected]>
@simon3z
Copy link
Contributor Author

simon3z commented Nov 14, 2016

Thanks @lunny can you check if this is acceptable?

@lunny
Copy link
Member

lunny commented Nov 17, 2016

400 Series  The command was not accepted and the requested action did not take place, but the error condition is temporary and the action may be requested again.
421 Service not available, closing control connection. This may be a reply to any command if the service knows it must shut down.
425 Can't open data connection.
426 Connection closed; transfer aborted.
430 Invalid username or password
434 Requested host unavailable.
450 Requested file action not taken.
451 Requested action aborted. Local error in processing.
452 Requested action not taken. Insufficient storage space in system.File unavailable (e.g., file busy).

500 Series  Syntax error, command unrecognized and the requested action did not take place. This may include errors such as command line too long.
501 Syntax error in parameters or arguments.
502 Command not implemented.
503 Bad sequence of commands.
504 Command not implemented for that parameter.
530 Not logged in.
532 Need account for storing files.
550 Requested action not taken. File unavailable (e.g., file not found, no access).
551 Requested action aborted. Page type unknown.
552 Requested file action aborted. Exceeded storage allocation (for current directory or dataset).
553 Requested action not taken. File name not allowed.

According to the above list, I think we have to know the returned err to decide return 450 or 553.

@lunny
Copy link
Member

lunny commented Jul 12, 2019

The difference between 450 and 553 is that 553 is file name is not allowed error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants