curl-users
Re: curl chunk option?
Date: Thu, 3 Sep 2009 09:39:04 +0200 (CEST)
On Wed, 2 Sep 2009, Chris Cross wrote:
> Daniel, curl certainly appears to be streaming instead of buffering the
> message
This statement confuses me as well, as -d certainly "buffers" the entire thing
in memory before it gets sent. But once it has buffered the file in ram it
will "stream" it to the server.
> but in both cases, -T and -F, the headers say Content-length. Is
> there an option to force curl to use "Transfer-encoding: chunked" ?
Yes you can, at least with -T. With -F there's simply no point in trying to
enforce that, as you won't gain anything due to how (lib)curl will evaluate
the full size of what to send before it starts to send anything - anyway. With
-T - or -d @- for example you can force chunked encoding getting used in the
request body by using:
-H "Transfer-Encoding: chunked"
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2009-09-03