[issue10202] ftplib doesn't check close status after sending file
Giampaolo Rodola'
report at bugs.python.org
Wed Oct 27 12:26:33 CEST 2010
Giampaolo Rodola' <g.rodola at gmail.com> added the comment:
> Proper behavior for ftplib when sending is to send all desired data,
> then call "sock.shutdown(socket.SHUT_RDWR)". This indicates that no
> more data will be sent, and blocks until the receiver has acknowledged
> all their data.
I'm not sure about this. Such a requirement should be respected by both peers and AFAICR there's no FTP-related RFC which explicitly states that shutdown() should be used.
http://www.rfc-archive.org/getrfc.php?rfc=4217 chapter 12.4 should reflect the same use case we're talking about: a client sending a file (STOR).
In the example only close() is used, which perhaps should lead this discussion to question whether socket's close() method is implemented properly, as your linux man quote suggests.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10202>
_______________________________________
More information about the Python-bugs-list
mailing list