cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: relative path with ftp using curl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 25 Jul 2003 09:34:50 +0200 (CEST)

On Thu, 24 Jul 2003, [iso-8859-15] François Pons wrote:

> > Try "ftp//user:pass/%2fdir". (The server will url-decode the %2f as a /
>
> Yes, thanks, it works.

It not only works, it is the only defined way to do it.

> But other tools allows a double // at the beginning to be interpreted as an
> absolute directory ?

 Not all tools allow // to specify an absolute directory. Curl used to allow
this as well, but we had to abandon this idea when we adjusted to follow
RFC1738 more strictly.

 Many tools do exactly what curl did before, they CWD into the full directory
at once, which then makes it easy to allow // for the root dir of the remote
server. That method of changing directory is however not working on all kinds
of FTP servers (and thus the main reason why curl doesn't do it like that
anymore).

 What tools accept // as an absolute path marker?

 If I were to accept a patch for this malformat, I would rather prefer a patch
that clearly identifies the initial double slash, and acted on that. Not on
every case of double slashes.

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-07-25