cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Sending an unbuffered PUT without chunked encoding

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 20 Nov 2014 22:21:39 +0100

On Wed, Nov 19, 2014 at 05:30:19PM -0800, Charles Pritchard wrote:
> How would I signal to CURL that I want to PUT data from STDIN without using
> chunked encoding and without buffering?
>
> Currently, -T triggers chunked encoding, I don't want that.
>
> I already know the content length ahead of time, so I don't need curl buffering
> the full data into memory as it does with --data-binary @-.

To avoid chunked uploading, HTTP requires the size of the file in advance. The
only way curl has to provide that information is to look it up in the
filesystem, so you can't avoid chunked transfers in this case.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-11-20