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-1733992 ] --request / -X not recognized with ftp url

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Sun, 10 Jun 2007 14:19:51 -0700

Bugs item #1733992, was opened at 2007-06-09 11:23
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1733992&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: Open
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Ale Vesely (alevesely)
Assigned to: Daniel Stenberg (bagder)
Summary: --request / -X not recognized with ftp url

Initial Comment:
Ooops, this is perhaps a duplicate of bug #986576

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: 2007-06-10 23:19

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

Sorry, but I beg to differ.

This very well shows that you replace the request keyword and it works.
But yes, you replace it with a keyword that get a different response code
from the server and no, libcurl does not figure that out but then it isn't
documented to do that and we've never attempted to make it do that.

I also really don't see the point in supporting this kind of operation.
Can you please elaborate on when this is useful?

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

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET