Well, from what curl says, it returns a size of zero:

$ curl -o ICMSHFCSTINIT -r 100-200 -n ftp://hendrix.meteo.fr/tmp/ICMSHFCSTINIT
** Resuming transfer from byte position 100
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
curl: (36) Offset (100) was beyond file size (0)

Philippe

________________________________
From: curl-library <curl-library-boun...@cool.haxx.se> on behalf of Dan 
Fandrich via curl-library <curl-library@cool.haxx.se>
Sent: Thursday, September 12, 2019 4:02 PM
To: curl-library@cool.haxx.se <curl-library@cool.haxx.se>
Cc: Dan Fandrich <d...@coneharvesters.com>
Subject: Re: Adding a feature to curl: disabling partial range verification

On Thu, Sep 12, 2019 at 01:52:04PM +0000, philippe marguinaud via curl-library 
wrote:
> I like curl, and I have written an application based on it to retrieve data
> from remote servers and then process it. I would like to use it at my work, 
> but
> all our data is stored on a proprietary FTP server which apparently does not
> return file size. No way to fix it, it is really closed software.

What does the server return in that case? A bogus value or an error code of
some sort?

> The problem is that when requesting partial transfers, curl performs a sanity
> check to verify that the requested range is actually included between 0 and 
> the
> file size. This is perfectly fine, except that it does not work in my case.
> Other software such lftp do not perform that check, and partial transfers work
> OK.
> I have created a git branch to add an option to curl so that the check on
> partial range be disabled. Would it be possible to have this integrated inside
> curl, and if so, how should I proceed ?

Is it possible to change libcurl to skip this check automatically if the server
doesn't return a size?
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to