cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: "Cmd REST not allowed by policy": can libcurl do w/o REST?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 28 May 2010 17:05:15 +0200 (CEST)

On Fri, 28 May 2010, Giulio Orsero wrote:

>> REST is only used by libcurl if you ask for resume/range transfers and not
>> otherwise.
>
> I'm using curlftpfs+fuse and so it seems it's curlftpfs that is asking rest.

Yes, so the problem is then probably within curlftpfs.

> Since I don't see any evident option in the curlftpfs manual to disable
> rest, and curlftpfs doesn't seem to be actively maintained, could you please
> suggest how I could solve this issue by somehow modifying the libcurl source
> to always disable rest?

I seriously doubt that is a functional way to approach this problem. If
curlftpfs wants only a part of the file, that is what it will ask for and that
is what REST would provide there. If you just remove REST, it will act
differently and I would assume that curlftpfs will be confused and the end
result will be badness and sorrow.

> I tried looking for a place to do this, ie a flag in curl.h to disable REST.
> but failed.

No, since that would be crazy. To avoid using REST with libcurl, you just
avoid asking for a range or resume an FTP transfer. And if you *do* ask for a
range or resumed transfer, not doing REST will result in wrong behavior.

If you want to proceed anyway, go lib/ftp.c and search for REST. I won't
sacrifise a lot of time on it.

> Grepping curlftpfs source for REST doesn't output anything related to ftp
> protocol.

You ask for range or resumed transfer from libcurl and libcurl will convert
that to FTP protocol lingo that (may) involve REST. libcurl tries to abstract
the specific protocol details away from the app.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-28