Re: Problem with ftp URLs and Passwds

From: Henrik Nordstrom <>
Date: Sun, 04 Aug 1996 23:02:19 +0200

> When I try to retrieve the URL
> I can get it with a Netscape Client from the Server but not through a
> squid.


> If you use
> then you can get the picture via a squid cache. But now Netscape fails.
> I don't want to start a religious war, which behaviour is correct. But
> at least for me it seems strange, that I need two different URLs with
> and without cache.

There is not much to say, it is in the RFC on URL syntax: RFC1738

3.2.2. FTP url-path

   The url-path of a FTP URL has the following syntax:


   Where <cwd1> through <cwdN> and <name> are (possibly encoded) strings
   and <typecode> is one of the characters "a", "i", or "d". The part
   ";type=<typecode>" may be omitted. The <cwdx> and <name> parts may be
   empty. The whole url-path may be omitted, including the "/"
   delimiting it from the prefix containing user, password, host, and

   The url-path is interpreted as a series of FTP commands as follows:

      Each of the <cwd> elements is to be supplied, sequentially, as the
      argument to a CWD (change working directory) command.
   ... [stuff about typecodes deleted]

   Within a name or CWD component, the characters "/" and ";" are
   reserved and must be encoded. The components are decoded prior to
   their use in the FTP protocol. In particular, if the appropriate FTP
   sequence to access a particular file requires supplying a string
   containing a "/" as an argument to a CWD or RETR command, it is
   necessary to encode each "/".

   For example, the URL <URL:ftp://myname@host.dom/%2Fetc/motd> is
   interpreted by FTP-ing to "host.dom", logging in as "myname"
   (prompting for a password if it is asked for), and then executing
   "CWD /etc" and then "RETR motd". This has a different meaning from
   <URL:ftp://myname@host.dom/etc/motd> which would "CWD etc" and then
   "RETR motd"; the initial "CWD" might be executed relative to the
   default directory for "myname". On the other hand,
   <URL:ftp://myname@host.dom//etc/motd>, would "CWD " with a null
   argument, then "CWD etc", and then "RETR motd".

I would say that the Squid way is closer to the truth than Netscape. Squid
don't support type codes (not that I know of anyway), and I think that
it only does one CWD with all directory components at once instead of
one CWD per component, and it doesn't support the use of %2F to encode
a / (as in the example above).

Henrik Nordström
Received on Sun Aug 04 1996 - 14:04:18 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:32:45 MST