cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Asynchronous

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 10 Mar 2008 13:14:51 +0100 (CET)

On Mon, 10 Mar 2008, Ingo Krabbe wrote:

>> For the whole life of one connection any time he can use sentTo() API and
>> pass the data to us. Any other solution for such kind of problem in
>> libcurl?
>
> I don't think that your problem is solveable by libcurl, since it adresses a
> restriction of the HTTP Protocol itself.

I disagree. You can start a POST and then just send off a chunk once you have
data to send. This is also possible to do with libcurl, even with the multi
interface with the use of curl_easy_pause().

> Each HTTP Request has to have (at least for most servers/clients), a
> Content-Length field, unless you use "chunked" transfer encoding
> or "multipart/byterange" mime types.

Right, but libcurl supports sending POSTs chunked perfectly fine, and perhaps
even the app knows the upcoming total size even if it doesn't have all the
data to start with?

> I don't know if Requests can use chunked encoding at all. This is normally
> used in answers. You have to try that.

It can be, as the spec says.

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