cURL / Mailing Lists / curl-users / Single Mail

curl-users

Empty FTP path components support

From: DAVID BALAZIC <david.balazic_at_uni-mb.si>
Date: Mon, 29 Sep 2003 19:25:04 +0200

Hi!

In curl-7.10.7/lib/ftp.c there are the following comments :

      /* we skip empty path components, like "x//y" since the FTP command CWD
         requires a parameter and a non-existant parameter a) doesn't work on
         many servers and b) has no effect on the others. */

c) "CWD " returns to the login directory on some servers.

I say it should be implemented :

a) "doesn't work on many servers"
  If the user supplies a nonworking URL that is his fault.
  This URL fails too : ftp://ftp.arnes.si/___/somefile.txt
  Will you now remove support for the underscore character, because it does
  not work on some servers ?

  On the other hand, some server act on "CWD " and curl now fails to retreive
  perfectly valid URLs from such servers ( URLs that have empty components, example:
ftp://uel003r2a:xxx@rcum.uni-mb.si/WWW//david.sig
this URL works if "emulated by hand" with a command line FTP client, but it
does not work with curl v7.10.7 )

b) "has no effect on the others"
 So what is the problem if empty components are supported ?

      /* RFC 1738 says empty components should be respected too, but
         that is plain stupid since CWD can't be used with an empty argument */

See above.

To conclude, I request supporting empty path components, because :
 - otherwise some valid URLs do not work
 - there is no harm caused, there aren't any downsides of supporting them

Regards,
David

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-09-29