cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Problems with FTP upload and 502 SIZE

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 28 Aug 2014 00:08:41 +0200 (CEST)

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
Received on 2014-08-28