id	summary	reporter	owner	description	type	status	priority	milestone	component	resolution	keywords	cc	branch	branch_author	launchpad_bug
3462	FTP server: upload should support async close	warner		"As discussed [http://twistedmatrix.com/pipermail/twisted-python/2008-October/018476.html on the mailing list], the FTP server in current trunk (r24958) does not have a mechanism for handling uploads that are not complete the moment the last byte is accepted by the consumer. This makes it difficult, for example, to implement an FTP frontend on a virtual filesystem that takes some amount of time/work to finish the upload process.

The proposed solution is to enhance [source:trunk/twisted/protocols/ftp.py#L1424 ftp:IWriteFile] to add a {{{close()}}} method, which will be called after the consumer has been disconnected, but before the '226 Transfer Complete' response is sent. {{{close()}}} can return a Deferred, and the response will not be sent until after it fires. The value produced by this Deferred is ignored.

Other proposed solutions were:
 * modify {{{unregisterProducer}}} to allow it to return a Deferred
 * do something at the VFS level

A patch to implement this change is attached. It does not yet have specific test coverage, but of course the existing tests still pass.

"	enhancement	closed	highest		ftp	fixed		exarkun terrycojones spiv	branches/ftp-async-close-3462	warner	
