emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: May be an ange-ftp bug on windows-xp


From: Michael Albinus
Subject: Re: May be an ange-ftp bug on windows-xp
Date: Fri, 20 Oct 2006 08:02:28 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Zhang Wei <address@hidden> writes:

Hi,

> The remote server is running Serv-U. We could see "220 Serv-U FTP Server
> v6.1 for WinSock ready..." in the greeting message.
>
> If the directory name contain SPACE characters, such as "This is a
> directory", ange-ftp can't CD to that dir.
>
> And I find out that the server understand this command:
>
> CD "This is a directory"
>
> but it don't understand
>
> CD This\ is\ a\ directory
>
> But ange-ftp can only compose command as the latter one.
>
> I don't know if this is a emacs bug, or because the server is ill
> implemented. But other popular ftp client such as CUTE-FTP don't have
> this problem.

I'm not sure whether it must be a server related bug. Pathnames are
parsed by the client, including quotings and their evaluation. I would
suspect that a server should get the pathname as string, without
quoting.

So first of all you should check which FTP client you are using. This
is always a sensible problem under w32. Emacs did point to trustworthy
ftp clients under w32 for years, now it expects the standard Windows
ftp.exe to be mature (see
<http://www.gnu.org/software/emacs/windows/faq8.html#ange-ftp>).

More general, quoting pathnames in an FTP client doesn't seem to be
specified as expected in the standards. RFC 959 regards pathnames just
as strings:

         Pathname is defined to be the character string which must be
         input to a file system by a user in order to identify a file.
         Pathname normally contains device and/or directory names, and
         file name specification.  FTP does not yet specify a standard
         pathname convention.  Each user must follow the file naming
         conventions of the file systems involved in the transfer.

Implicitely, one could assume that a string can be embedded in double
quotes (as the usual definition of strings). This is used also for
responses like 257 defined in that standard. But the practice of
ange-ftp, escaping special characters by back spaces, seems to be also
in use.

The only place in the standard discussing pathname quotes is the case
where a pathname in a response contains a double-quote ("). Then it is
required to double the double-quote.

Not satisfactory at all.

ange-ftp is aware of this problem. The corresponding function,
`ange-ftp-quote-stringĀ“, contains the following comment:

;; This is said to be wrong; ftp is said to need quoting only for ",
;; and that by doubling it.  But experiment says this kind of quoting
;; is correct when talking to ftp on GNU/Linux systems.

One could change the implementation of this function, but I have no
idea whether other ftp clients will be broken then.

Maybe one needs a customer option in ange-ftp for how to quote pathnames.

Best regards, Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]