cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTP Put and Content-Length header

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

--On 9 August 2011 15:09:09 +0200 Daniel Stenberg <daniel_at_haxx.se> 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: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-09