curl-library
Re: Problems with FTP upload and 502 SIZE
Date: Wed, 27 Aug 2014 10:02:34 +0200 (CEST)
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.htmlReceived on 2014-08-27