curl-library
Re: CURLINFO_CONTENT_LENGTH_DOWNLOAD can't get remote file in mips-linux
Date: Sat, 4 Nov 2017 22:37:23 +0100 (CET)
On Wed, 1 Nov 2017, ???????? via curl-library wrote:
> I want to use libcurl to to make ftp upload and resume function. I have
> to get remote file in ftp server to realize resume function. I used
> ftpgetinfo.c to test. However it works in x86 pc, not work ini mips-linux.
> the CURLINFO_CONTENT_LENGTH_DOWNLOAD always return 0 which mean the remote
> file size is zero.
And you're using the same libcurl version against the same FTP server?
> 2.And I dig into libcurl. The function ftp_state_size_resp in ftp.c
> filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1;
> Here filesize is ok.
> But when I use CURLINFO_CONTENT_LENGTH_DOWNLOAD to get it. i't zero.
> 3.dig into getinfo_double in getinfo.c
> case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
> *param_doublep = (data->progress.flags & PGRS_DL_SIZE_KNOWN)?
> (double)data->progress.size_dl:-1;
> break
So where does it get cleared? In ftp_state_size_resp() the size gets stored,
does it (arongly) get stored again to zero somewhere?
> However Curl_client_write get CURLE_RECV_ERROR, and return??
Hm, that looks like you're using an older libcurl. The code I read doesn't
look like that...
-- / daniel.haxx.se ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2017-11-04