cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: ftp partial file and EPSV questions

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 18 Oct 2005 18:21:59 +0200 (CEST)

On Tue, 18 Oct 2005, Zibiao.Wei_at_atxinc.com wrote:

> One problem is a file gets uploaded but when download, I get
> CURLE_PARTIAL_FILE error. Interestingly before RETR command, the SIZE
> command gets correct size. If I insert 100 milliseconds between the upload
> and download, problem goes away. Any clues what's going on? Is there a
> better solution rather than insert some delay time?

To me, this sounds like if the server hasn't actually flushed the file to disk
properly when you start to download it... but that doesn't explain why SIZE
would say the right value.

> 2. I encounter an ftp server that accepts EPSV command and returns a data
> port number, but libcurl can never continue to transfer data

Then the server is broken or behind a firewall that doesn't track ftp sessions
or similar.

> neither does libcurl try to change to PASV mode.

libcurl only changes to PASV is EPSV doesn't work, as in returns a response
code indicating that. In your case it seems to respond OK but then just not
act correctly.

> Some other ftp utility initially starts with PASV command and is able to
> continue transferring data. Is this a server problem or other possibility?

Possibly a broken server implementation, possibly a firewall that tracks PASV
connections but not EPSV connections. Possibly something completely different.

I'd say you should contact the server admin and ask.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-10-18