Wait to send 226 until data transfer complete
|Reported by:||Nathan Reynolds||Owned by:|
|Component version:||Operating system type:||Windows|
|Operating system version:||7 64-bit|
I am trying to debug a situation. My FTP client initiates a download of a file using EPSV. FileZilla FTP Server writes all of the file data into the data socket buffer. FileZilla FTP Server then sends reply code 226 (closing data connection. Requested file action successful) on the command socket.
Using Wireshark, I can see that the 226 packet is sent on the network before the entire file is sent. At some point during the file transfer, a packet fails to be ACKed by the client. The server OS retransmits the packet 4 more times and then gives up. This problem is not FileZilla's issue.
The problem is that FileZilla FTP Server will send 226 before the data transfer is complete. Instead, FileZilla should wait to see if there are any problems with the data transfer and only send 226 when it has fully finished.