cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems with FTP upload and 502 SIZE

From: John Coffey <johnco3_at_gmail.com>
Date: Wed, 27 Aug 2014 18:49:44 -0400

Daniel,

I agree - its more about understanding the API documentation rather than
fixing the code. The man page could do with a bit of a clue there,
especially given the undocumented implicit relationship between the
CURLOPT_UPLOAD
and the CURLOPT_NOBODY settings.

Thanks again

John

On Wed, Aug 27, 2014 at 6:08 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Wed, 27 Aug 2014, John Coffey wrote:
>
> Daniel,
>> removing the above call to worked well. (effectively leaving the
>> CURLOPT_NOBODY
>> at 0L).
>>
>> I would never have guessed that the directory suppression workaround
>> would have confused libCurl into thinking it was a download. Sounds like
>> there might be a bug lurking there.
>>
>
> Yes. Well, if not a bug so at least an unintended consequence and one that
> is hard to track down unless you know the insides.
>
> It is possibly easier to understand when you consider that these options
> were made for HTTP initially and then NOBODY implies a HEAD request which
> of course is mutually exclusive with PUT that is used for upload...
>
> My obvious gut reaction is to clarify the man page to make it more obvious
> what the option is really intended for, but I think that isn't really
> enough. We should adress this in the code somehow, I just have a hard time
> to decide how. Any suggestion?
>
> CURLOPT_UPLOAD actually sets CURLOPT_NOBODY to 0, so if you'd had them in
> the other order in the code there wouldn't have been any problem!
>
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-28