curl-library
"Cmd REST not allowed by policy": can libcurl do w/o REST?
Date: Fri, 28 May 2010 14:30:58 +0200
libcurl-7.20.1, curlftpfs-0.9.2
Problem with an FTP server which doesn't support REST.
I cannot control or ask anything to the remote FTP site operator.
Downloading a 16385 bytes file:
=== libcurl log (via curlftpfs):
* Instructs server to resume from offset 16384
> REST 16384
< 502 Command REST not allowed by policy.
* Couldn't use REST
===
In the end I get a 16384 bytes file instead of 16385.
If I try with an ftp client I get the same results:
=== session done manually with ftp client:
...
Remote system type is UNIX. (don't know anything more about the server)
...
...
ftp> size TEST13
213 16385
ftp> rest 16384
restarting at 16384. execute get, put or append to initiate transfer
ftp> get 16384
local: 16384 remote: 16384
227 Entering Passive Mode (1,2,3,4,4,65)
502 Command REST not allowed by policy. <=========
===
Is there a way to work-aroud this issue?
I need to download very small files (10/50k range), I can do that with an
ftp client, but it seems libcurl+curlftpfs prefer to use rest instead of
getting the file in one big chunk.
I'd really need to use curlftpfs+libcurl.
Thanks
I'm attaching the entire log of a curlftpfs+libcurl session in which a
single "cp remote local" command was issued.
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* About to connect() to 1.2.3.4 port 21 (#0)
* Trying 1.2.3.4... * connected
* Connected to 1.2.3.4 (1.2.3.4) port 21 (#0)
< 220 welcome to FTPserver SERVER NAME
> USER username
< 331 Password required for username
> PASS password
< 230 Logged on
> PWD
< 257 "/" is current directory.
* Entry path is '/'
* Remembering we are in dir ""
* Connection #0 to host 1.2.3.4 left intact
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* Re-using existing connection! (#0) with host 1.2.3.4
* Connected to 1.2.3.4 (1.2.3.4) port 21 (#0)
* Request has same path as previous transfer
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (1,2,3,4,4,57)
* Trying 1.2.3.4... * connected
* Connecting to 1.2.3.4 (1.2.3.4) port 1081
> TYPE A
< 200 Type set to A
> LIST -a
< 150 Connection accepted
* Maxdownload = -1
* Remembering we are in dir ""
< 226 Transfer OK
* Connection #0 to host 1.2.3.4 left intact
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* Re-using existing connection! (#0) with host 1.2.3.4
* Connected to 1.2.3.4 (1.2.3.4) port 21 (#0)
> CWD /
< 250 CWD successful. "/" is current directory.
> CWD dir01
< 250 CWD successful. "/dir01" is current directory.
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (1,2,3,4,4,58)
* Trying 1.2.3.4... * connected
* Connecting to 1.2.3.4 (1.2.3.4) port 1082
> LIST -a
< 150 Connection accepted
* Maxdownload = -1
* Remembering we are in dir "dir01/"
< 226 Transfer OK
* Connection #0 to host 1.2.3.4 left intact
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* About to connect() to 1.2.3.4 port 21 (#0)
* Trying 1.2.3.4... < 220 welcome to FTPserver SERVER NAME
> USER username
< 331 Password required for username
> PASS password
< 230 Logged on
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD dir01
< 250 CWD successful. "/dir01" is current directory.
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (1,2,3,4,4,59)
* Trying 1.2.3.4... * Connecting to 1.2.3.4 (1.2.3.4) port 1083
> TYPE I
< 200 Type set to I
> SIZE TEST13
< 213 16385
> RETR TEST13
< 150 Connection accepted
* Maxdownload = -1
* Getting file with size: 16385
* Remembering we are in dir "dir01/"
< 226 Transfer OK
* Connection #0 to host 1.2.3.4 left intact
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* Re-using existing connection! (#0) with host 1.2.3.4
* Connected to 1.2.3.4 (1.2.3.4) port 21 (#0)
* Request has same path as previous transfer
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (1,2,3,4,4,60)
* Trying 1.2.3.4... * Connecting to 1.2.3.4 (1.2.3.4) port 1084
> SIZE TEST13
< 213 16385
* Instructs server to resume from offset 16384
> REST 16384
< 502 Command REST not allowed by policy.
* Couldn't use REST
* Expire cleared
* Closing connection #0
ftpfs: operation ftpfs_read failed because Input/output error
* Couldn't find host 1.2.3.4 in the .netrc file; using defaults
* About to connect() to 1.2.3.4 port 21 (#0)
* Trying 1.2.3.4... < 220 welcome to FTPserver SERVER NAME
> USER username
< 331 Password required for username
> PASS password
< 230 Logged on
> PWD
< 257 "/" is current directory.
* Entry path is '/'
> CWD dir01
< 250 CWD successful. "/dir01" is current directory.
> PASV
* Connect data stream passively
< 227 Entering Passive Mode (1,2,3,4,4,61)
* Trying 1.2.3.4... * Connecting to 1.2.3.4 (1.2.3.4) port 1085
> TYPE I
< 200 Type set to I
> SIZE TEST13
< 213 16385
* Instructs server to resume from offset 16384
> REST 16384
< 502 Command REST not allowed by policy.
* Couldn't use REST
* Expire cleared
* Closing connection #0
ftpfs: operation ftpfs_read failed because Input/output error
-- giulioo_at_pobox.com ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-05-28