curl-library
Re: Gargbage sent with PUT
Date: Mon, 26 Sep 2011 21:54:58 +0200 (CEST)
On Mon, 26 Sep 2011, Robert Kohn wrote:
>> Because due to a bug you couldn't replace Content-Length: in all
>> circumstances. I just committed a bug fix for this.
>
> Do you have an estimate as to when (and what version) this will be released?
You're using libcurl 7.18.0 that was released well over 3 years ago and you're
asking when next release comes, that allows a feature that you really don't
want anyway... We've done 21 releases since your version, each one full of
bugfixes!
> For a PUT operation, if I do not include Content-Length
You should not include it, libcurl should. You should use CURLOPT_INFILESIZE
or CURLOPT_INFILESIZE_LARGE for that.
>> That's beyond what we can tell. That's clearly a header and I don't know
>> why or how that ends up in your file.
>
> Here is a clue. My actual header looks like:
>
> Expect:
> Content-Length: 46
> Date: Mon, 26 Sep 2011 15:59:54 +0000
> Authorization: AWS JFIERJF678fj:fjkPNJ8fnh&hb&noe7byOY&ERBY
>
> But when I perform the PUT, the Content-Length: 46 shows up again (as you
> know) after the Authorization line (preceded and followed by a newline).
Then I assume your "Authorization:" line (which wasn't present in the code you
said you're using) adds a newline so that the line following it gets treated
as body contents.
> I hope that when you fix the "Content-Length" problem, my PUT will work.
You don't need my fix. I'm fully convinced that if there's indeed a problem
with PUT in your libcurl version, it has already been fixed in a subsequent
release that you can already get and use.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-09-26