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 12:01:02 -0400

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. Thankyou for your prompt response and
resolution to the problem.

John

On Wed, Aug 27, 2014 at 4:02 AM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Tue, 26 Aug 2014, John Coffey wrote:
>
> I have both a wireshark and debug output that seems to indicate that the
>> server does not support SIZE (returning a 502), I have the NO CWD option
>> specified and I have followed the example in the ftpupload.c - however for
>> some reason it appears I cannot get the file to upload.
>>
>
> The fact that it doesn't support SIZE is actually not the problem. The
> problem here is rather that libcurl sends SIZE in the first place since for
> a "simple" upload it shouldn't have to issue that command. I mean, the
> destination file may exist before the upload but is then about to be
> overwritten to the size prior to the transfer is actually completely
> uninteresting.
>
>
> // disable automatic directory listings
>> curl_easy_setopt(pCurl, CURLOPT_NOBODY, 1L);
>>
>
> It may disable automatic directory listings when you DOWNLOAD data, but
> when you specify you don't want a "body" for an upload I think it confuses
> somthing in libcurl. Can you try not using this and see if it makes a
> difference?
>
> It looks like libcurl treats the transfer as a download rather than an
> upload...
>
> --
>
> / 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-27