Re: Ftp fetch file names with spaces

Joe Orton <[email protected]> Mon, 15 Aug 2005 15:57:13 +0100
Newsgroups gmane.comp.web.sitecopy
Message-ID <[email protected]>
On Mon, Aug 15, 2005 at 10:36:11AM -0400, Tobey Wheelock wrote:
> On Sat, Aug 13, 2005 at 04:20:11PM +0100, Joe Orton wrote:
> > It's not really clear how to solve this in FTP.
> > 
> > Does this patch make a difference?
> > 
> > +    if (execute(sess, "MDTM \"%s%s\"", root, filename) == FTP_MODTIME) {

Actaully I think this is a server bug, the current I-D which documents 
MDTM does explain explicitly how to handle spaces in path names:

http://www.ietf.org/internet-drafts/draft-ietf-ftpext-mlst-16.txt 

[section 2.2 paragraph 3]

   Unless otherwise specified, the pathname is terminated by the CRLF
   that terminates the FTP command, or by the CRLF that ends a reply.
   Any trailing spaces preceding that CRLF form part of the name.
   Exactly one space will precede the pathname and serve as a separator
   from the preceding syntax element.  Any additional spaces form part
   of the pathname.  See [7] for a fuller explanation of the character
   encoding issues.  All implementations supporting MLST MUST support
   [7].

joe
_______________________________________________
sitecopy maillist  -  [email protected]
http://dav.lyra.org/mailman/listinfo/sitecopy