[NET-649] 227 Entering Passive Mode #28
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a situation where I passed, the FTP server is restoring 227 Entering Passive Mode (0,0,0,0,156,126), so it was obvious to me that the problem is on the server side and not on the API, but using the File Zila client and analyze the log precebi that the same problem was also happening, so he changed the route to use the IP of the server that returned this information and thus manages to make the route correctly.
So I made a similar implementation so that when the server returns IP 0,0,0,0 use the same IP used to connect to the server. I'm not sure if it's necessary to validate anything beyond "0,0,0,0" because it's the first time I see a situation like this, I'm not sure if the server could return another invalid IP.
I did not create a test for this case because I do not know how to force it to happen, since it only occurred on a private server that I am using. This is a workaround I've solved, and I'm helping to get you into future versions.