Sep 19, 2012 at 12:20 AM
Edited Sep 19, 2012 at 12:36 AM
I was thinking about making a change that only tries EPSV if it is featured.
I thought about it, because I find a lot of servers that doesn't advertise it with the FEAT command, but doesn't return an error 500 which allow us to fallback to PASV.
I know we will lose EPSV on all of the servers that doesn't advertise it, but we will be able to work on server that have not expected behaviors.
EDIT: For these servers, the problems occurs in the FtpPassiveStream class, in the Open() method.
reply = this.ControlConnection.Execute("EPSV");
but it never succeed to connect, and the line
One possibilities, but not clean, should be to catch exceptions from the Socket.Connect() method, and then tries PASV, but this is not something expected, and I think it might induce other behavior. That's why I think we should only uses EPSV if it is featured.