cURL / Mailing Lists / curl-library / Single Mail


Re: HTTP Put and Content-Length header

From: Alex Bligh <>
Date: Tue, 09 Aug 2011 18:55:20 +0100

--On 9 August 2011 15:09:09 +0200 Daniel Stenberg <> wrote:

>> The behaviour I expected was for curl to work the content length out
>> from CURLOPT_INFILESIZE_LARGE. Perhaps that was naive?
> No, it was correct!

I was scraping an authentication header from an earlier reply, and
putting it verbatim (i.e. with the "\r\n"). That was pushing the
Content-Length header into the body, because adding a header in
curl adds its own \r\n. This didn't affect any other calls as
curl wasn't adding any later headers (and/or it doesn't matter on
a GET).

IE a problem with my code, not curl's.

Alex Bligh
List admin:
Received on 2011-08-09