Brian Brazil <brian.bra...@gmail.com> added the comment:

I've tested this on head, and the issue appears to be buggy ftp code in python.

>From the attached tcpdump for fetching delegated-ripencc-20120706:

12:57:19.933607 IP myhost.39627 > ftp.ripe.net.ftp: Flags [.], ack 511, win 
115, options [nop,nop,TS val 129353190 ecr 1632444059], length 0
12:57:19.934853 IP myhost.39627 > ftp.ripe.net.ftp: Flags [F.], seq 97, ack 
511, win 115, options [nop,nop,TS val 129353191 ecr 1632444059], length 0

and a bit later:

12:57:20.043701 IP ftp.ripe.net.42707 > myhost.50818: Flags [.], seq 
46337:47785, ack 1, win 227, options [nop,nop,TS val 2552550247 ecr 129353204], 
length 1448
12:57:20.043717 IP myhost.50818 > ftp.ripe.net.42707: Flags [.], ack 47785, win 
353, options [nop,nop,TS val 129353218 ecr 2552550247], length 0
12:57:20.043816 IP ftp.ripe.net.42707 > myhost.50818: Flags [FP.], seq 
47785:49153, ack 1, win 227, options [nop,nop,TS val 2552550247 ecr 129353204], 
length 1368
12:57:20.043992 IP myhost.50818 > ftp.ripe.net.42707: Flags [F.], seq 1, ack 
49154, win 376, options [nop,nop,TS val 129353218 ecr 2552550247], length 0
12:57:20.094067 IP ftp.ripe.net.42707 > myhost.50818: Flags [.], ack 2, win 
227, options [nop,nop,TS val 2552550299 ecr 129353218], length 0

As you can see we're sending a FIN without sending a close command to the 
control connection, and in response the server stops sending data about 49k in. 
Per RFC 959 section 2.3: "The server may abort data transfer if the control 
connections are closed without command." so this is acceptable behaviour on the 
part of the server, and means we need to keep the control connection open for 
longer.

----------
nosy: +bbrazil
Added file: http://bugs.python.org/file26290/issue15002-tcpdump-early-fin

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15002>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to