Tcl Library Source Code

View Ticket
Login
Ticket UUID: d5cf8839c3be1eb82eaf86cbc3380b87e8be3417
Title: [active mode] STOR data flushes before server connects to port
Type: Bug Version: 1.7
Submitter: pclay Created on: 2020-06-09 19:21:27
Subsystem: ftp Assigned To: aku
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2021-03-23 10:13:20
Resolution: None Closed By: nobody
    Closed on:
Description:
This occurs when connecting via active mode with a file (or data) with newlines. It seems that in InitDataConn(), there is a fileevent that attaches to when the socket is writeable to HandleOutput and the socket is setup with buffering = line (irrespective of mode) 

When in active mode, the server hasn't connected yet to the port that the client provides and the buffering=line causes the data to flush before being sent. This leads to a "Timeout of Control Connection" as [with the pyftpdlib server] it terminates the connection as the channel is not readable.

I am using version 1.7 of tcllib (ftp 2.4.1) however, it seems that this issue should still be in ftp 2.4.13
User Comments: aku added on 2021-03-23 10:13:20:
What is your proposed solution ?

Simply removing `buffering=line` ?
Or using `buffering=full` ?