cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-986576 ] --request / -X not recognized with ftp url

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sat, 09 Jun 2007 02:19:16 -0700

Bugs item #986576, was opened at 2004-07-07 15:21
Message generated for change (Comment added) made by alevesely
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=986576&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ftp
Group: bad behaviour
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: --request / -X not recognized with ftp url

Initial Comment:
curl 7.12.0 (i386-pc-win32) libcurl/7.12.0 zlib/1.2.1
Protocols: ftp gopher telnet dict ldap http file
Features: libz

Hi,

I'm trying to rename a file before downloading it.
I thought that -X (or --request) will allow me to rename
the file before getting it, but the -X in the following
command return
curl: (19) Syntax error, Command not recognized.

.\curl -X ls -u xxx:xxx ftp://host/dir/
.\curl --request ls -u xxx:xxx ftp://host/dir/

I ultimatly want to :
.\curl -X "ren a.txt a_old.txt" -u xxx:xxx ftp://host/dir/
.\curl -u xxx:xxx ftp://host/dir/a_old.txt

Regards,
Hadar

----------------------------------------------------------------------

Comment By: Ale Vesely (alevesely)
Date: 2007-06-09 11:19

Message:
Logged In: YES
user_id=262065
Originator: NO

I'm not sure if this is the same bug, but the effect is the same, and
since it is
still open I add to this rather than opening a new bug...

If I run an ftp session (with -Q commands) without specifying a target
file I get
a LIST of a possibly long directory. According to the man page, using -X
should
replace LIST with a custom command. It does not work, as the following
captured
terminal shows:

D:\tmp>curl -v -u xxx -X NOOP ftp://abcd.tana.it/tmp/ -Q "-RNFR foo.tmp"
-Q "-RNTO foo.dat"
Enter host password for user 'xxx':* About to connect() to abcd.tana.it
port 21
 (#0)
* Trying 194.243.254.xyz... connected
* Connected to abcd.tana.it (194.243.254.xyz) port 21 (#0)
< 220 My ftp server ready
> USER xxx
< 331 Password required for xxx.
> PASS ********
< 230 User xxx logged in.
> PWD
< 257 "/home/xxx" is current directory.
* Entry path is '/home/xxx'
> CWD tmp
< 250 CWD command successful.
> EPSV
* Connect data stream passively
< 500 'EPSV': command not understood.
* disabling EPSV usage
> PASV
< 227 Entering Passive Mode (194,243,254,xyz,14,98)
* Trying 194.243.254.xyz... connected
* Connecting to 194.243.254.xyz (194.243.254.xyz) port 3682
> TYPE A
< 200 Type set to A.
> NOOP
< 200 NOOP command successful.
* RETR response: 200
* Remembering we are in dir tmp/
* Connection #0 to host north.tana.it left intact
curl: (19) RETR response: 200
> QUIT
< 221-You have transferred 0 bytes in 0 files.
< 221-Total traffic for this session was 396 bytes in 0 transfers.
< 221-Thank you for using the FTP service on abcd.tana.it.
< 221 Goodbye.
* Closing connection #0

Notice that RETR is causing an exit status of 19 although it is
actually never issued to the ftp server: the trace shown above is
correct and NOOP was the last command (before QUIT).

D:\tmp>curl -V
curl 7.16.2 (i586-pc-mingw32msvc) libcurl/7.16.2 zlib/1.2.2
Protocols: tftp ftp telnet dict ldap http file
Features: Largefile NTLM SSPI libz

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2004-07-14 17:18

Message:
Logged In: YES
user_id=1110

Oh, and read up on the -Q option.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2004-07-14 17:15

Message:
Logged In: YES
user_id=1110

'ls' is not a recognized FTP command, see RFC959.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=986576&group_id=976
Received on 2007-06-09

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET