cURL / Mailing Lists / curl-library / Single Mail


Re: curl_easy_send with CURLOPT_CONNECT_ONLY

From: Daniel Stenberg <>
Date: Sat, 7 Aug 2010 23:51:13 +0200 (CEST)

On Sat, 7 Aug 2010, Georg Lippitsch wrote:

> why do curl_easy_send and curl_easy_recv only work if CURLOPT_CONNECT_ONLY
> is set?

Primarily because those functions were designed for that purpose and that's
what we've tested them for. Since we haven't made it supported in any other
situation, functionality beyond that is not guaranteed - so even if you may
find that something works now it may not in the next release.

Both those commands are also very powerful and can very easily be used in ways
that severly confuse or mess up the internal FTP "engine" and its state

> In my special case, I want to use the ftp control connection to send/receive
> custom data while a large file is uploaded.

That isn't very reliable. It has proven that a lot of FTP servers don't read
or respond to commands while the transfer is in progress. That also explains
another reason we limit these functions: we do our very best to make libcurl
work and work reliably with all servers.

> But I think, there might also be other uses for curl_easy_send without
> CURLOPT_CONNECT_ONLY, for example to send custom data to an open connection
> after a file was downloaded.

That's what we have the CURLOPT_*QUOTE options for.

> Are there any objections using curl_easy_send the way I did?

Yes, as explained.

List admin:
Received on 2010-08-07