cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: transfer-encoding chunked please

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 1 Dec 2002 12:03:35 +0100 (MET)

On Fri, 29 Nov 2002 RBramante_at_on.com wrote:

> How about adding a constant for setting the CURLOPT_INFILESIZE that would
> imply a dynamic length and request that libcurl perform the transfer in
> chunked fashion?
>
> e.g. CURLOPT_INFILE_DYNAMIC = -1
>
> This would at least allow the user to have a more precise way of requesting
> chunked encoding above setting a custom header without needing to add
> another CURLOPT. Since you are"setting" the infilesize (even though it may
> be unknown) this would seem to make sense to me and is what I did when I
> wrote my chunked encoder wrapper. If I received a value of >=0 I just set
> INFILESIZE to that. If I recv'd < 0, that signalled me to perform a
> chunked transfer.

This is not a bad idea, but a bit too restricted to PUT requests. In the test
case I did this change for, I performed a multi-part formpost transfered as
chunked, and for such transfers the application doesn't set the INFILESIZE to
anything, as it doesn't make sense in this context.

All kinds of requests that send off data to the server should be able to get
it sent chunked.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-12-01