curl-library
Re: CURLINFO_CONTENT_LENGTH_DOWNLOAD can't get remote file inmips-linux
Date: Mon, 6 Nov 2017 17:11:46 +0800
Hi all:
    I use the latest version curl. It works fine. Thanks All.
------------------ Original ------------------
From:  "Daniel Stenberg";<daniel_at_haxx.se>;
Date:  Sun, Nov 5, 2017 05:37 AM
To:  "???????? via curl-library"<curl-library_at_cool.haxx.se>;
Cc:  "บฺฐตนโรข"<513977391_at_qq.com>; 
Subject:  Re: CURLINFO_CONTENT_LENGTH_DOWNLOAD can't get remote file inmips-linux
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.html
Received on 2017-11-06