Opened 16 years ago

Last modified 16 years ago

#1275 defect closed fixed (fixed)

[PATCH] FTP server does not send 221 message when closing

Reported by: pjdm Owned by:
Priority: high Milestone:
Component: core Keywords: backport
Cc: Jean-Paul Calderone, Alejandro J. Cura, pjdm Branch:
Author:

Description


Attachments (2)

combined.txt (723 bytes) - added by pjdm 16 years ago.
quit221.diff (1.1 KB) - added by Alejandro J. Cura 16 years ago.

Download all attachments as: .zip

Change History (7)

Changed 16 years ago by pjdm

Attachment: combined.txt added

comment:1 Changed 16 years ago by pjdm

The FTP server does not send a 221 message when the client closes the session. 
When using the Python builtin ftplib.FTP class, this causes FTP.quit() to raise 
an EOFError. (The EOFError does not happen when connecting to the Windows XP FTP 
server, which does send a final 221 message.)

The attachment contains a sample Twisted FTP server implementation, and a Python 
ftlib client that connects and quits, demonstrating the problem.

comment:2 Changed 16 years ago by pjdm

Versions: Twisted 2.1.0, Python 2.4.1, Windows XP SP2

Changed 16 years ago by Alejandro J. Cura

Attachment: quit221.diff added

comment:3 Changed 16 years ago by Alejandro J. Cura

self.reply(GOODBYE_MSG) was needed in ftp_QUIT
A diff with the fix and a test is attached.
pjdm's sample server and client also passes (twisted svn, mdk10.1)

comment:4 Changed 16 years ago by Jean-Paul Calderone

Resolved by r14856

comment:5 Changed 11 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.