curl-and-python

Re: Picky firewalls/ftp servers: NOOP-based FTP keep-alive ?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 3 Dec 2010 13:55:10 +0100 (CET)

On Thu, 18 Nov 2010, Florent Thiery wrote:

> We managed to implement tcp-level keep-alive on the 2 sockets (control &
> data, by using M_SOCKETFUNCTION, see code below), which AFAIK is the closest
> to the approach taken by the original curl utility. We also raised timeouts
> to 5 min for TCP and 24 hours for general timeout value.
>
> However, this does not solve all of the disconnections issues, so we are
> wanting to make it more robust by using NOOP-based keep alive (or LST,
> etc...), i.e. not sending dummy tcp packets but rather dummy FTP commands.

Sorry, but that is not a "more robust" way. We've tried that in the past, and
the sad reality is that lots of servers don't handle the control connection
while the transfer is in progress so sending NOOPs like that doesn't work
reliably.

> Any idea how this could be done in python ? Do we need to patch libcurl
> itself for this ? How can we continue interact with the command stream while
> uploading ?

You'd need to modify libcurl.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2010-12-03