curl-library
Re: left before release
Date: Thu, 28 Aug 2008 07:38:59 +0200 (CEST)
On Wed, 27 Aug 2008, Dan Fandrich wrote:
> I figured out the root of the problem: the second URL acts as though it
> wants to do a GET but it actually sends a PUT request. The solution is to
> fix the CURLOPT_UPLOAD handling so that when given a 0 value it sets the
> HTTP request back to GET (or HEAD). A very similar fix went in four years
> ago to do the same thing with the CURLOPT_POST option.
Ah yes. I think we more or less have to set it to GET when upload (PUT) is
explicitly disabled like that - in order to make libcurl still do a fine
request. As I recall it I found no other solution when I did that change for
POST.
> It does mean that the curl command-line will do both a PUT and a GET from
> the command line if only one -T option is given and several URLs. The
> change shouldn't affect any correct clients--only those who set
> CURLOPT_UPLOAD to 0 and then expect to do an upload anyway.
Yes, and if we want the command line tool to behave differently, I say we
change that there after this fix is done in libcurl.
-- / daniel.haxx.seReceived on 2008-08-28