cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: question of curl_easy_getinfo on sftp

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 16 Jan 2014 17:53:29 +0100 (CET)

On Thu, 16 Jan 2014, ?????? wrote:

> I want to get size of a file with libcurl on sftp . so I use the
> curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &filesize) and get
> size in filesize . but it always print the content of the file .
>
> Then I set the option of nobody like this curl_easy_setopt(curl,
> CURLOPT_NOBODY, 1L) it doesn't print the file ,but I can't get the size!!!

Yeah, I can see how the state machine in lib/ssh.c stops too early if
CURLOPT_NOBODY is set. Any chance you can see if you can fix this and send us
a patch?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-16