My ISP (BT Infinity) is stealing my data, and I want them back.
Using Curl to download a file from ftp://ftp.mirrorservice.org/ I see this, just before Curl hangs forever, waiting for more data:
sendto(3, "EPSV\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6
> EPSV
* Connect data stream passively
recvfrom(3, "229 Entering Extended Passive Mode (|||13825|)\r", 16384, 0, NULL, NULL) = 47
recvfrom(3, 0x12f39e7, 16337, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
The problem is that the FTP response should be terminated with "\r\n", but there's only a "\r" so Curl keeps waiting for the rest of the response.
If I do the same download from the same machine over a different network (such as my mobile phone's 3G connection) then I get the right response:
sendto(3, "EPSV\r\n", 6, MSG_NOSIGNAL, NULL, 0) = 6
> EPSV
* Connect data stream passively
recvfrom(3, "229 Entering Extended Passive Mode (|||9859|).\r\n", 16384, 0, NULL, NULL) = 48
Notice that not only do I get "\r\n" but there's also a "." at the end of the packet, which was missing before.
If I download over the BT line, but using a VPN so the traffic is encrypted, it also works.
So it seems as though BT is applying some kind of filtering that converts "|).\r\n" into "|)\r" maybe because of a shitty regex written by some clown. (Anyone got any ideas why they'd be looking at "|).\r\n"? Does that appear in bittorrent traffic that they might be watching out for to stop naughty downloads?)
I can workaround this by telling Curl not to use EPSV mode (--disable-epsv) or by downloading over HTTP instead of FTP, or encrypting all my traffic so the shitty regex can't see it. But I'm not happy that I need to do this.
What the hell, BT? Stop mangling my network traffic.