Godaddy Server : MLST Transaction parse fails in GetObjectInfo function

Aug 20, 2011 at 7:09 PM

Hi,

I am working with GoDaddy linux shared hosting for my FTP. In method GetObjectInfo, at line 619 (code pasted below), the execution fails. You assume MLST Transaction to start with a space, which is not happening with the response I am getting from Godaddy server. I am also attaching response from Godaddy Server below

------ The code where execution fails
// MLST response starts with a space according to draft-ietf-ftpext-mlst-16
if(s.StartsWith(" ")) {
	return new FtpListItem(s, FtpListType.MLST);
}

---- Response from GoDaddy Server.

"type=dir;sizd=4096;modify=20110820183757;UNIX.mode=0705;UNIX.uid=7068495;UNIX.gid=100450;unique=17g3cfe2b; 2011.08.21"

I tries to parse the response in FtpListItem and it parses perfectly. So I guess the assumption to expect result having space could be altered, though specs are with you :)

Thanks, 
Nav 

Coordinator
Aug 21, 2011 at 2:56 PM

Sorry about the delay on responding to this, I've been out of town. Straight from the specification:

 


Note that for MLST the fact set is preceded by a space.  That is
provided to guarantee that the fact set cannot be accidentally
interpreted as the terminating line of the control response, but is
required even when that would not be possible.  Exactly one space
exists between the set of facts and the pathname.  Where no facts
are present, there will be exactly two leading spaces before the
pathname.  No spaces are permitted in the facts, any other spaces in
the response are to be treated as being a part of the pathname.

Regardless, I'll look into ways to make this more robust for servers that don't follow the specification. Will post back here with the revision number when I've got it sorted out.

 

Coordinator
Aug 21, 2011 at 11:05 PM

Try out revision 8732 and see if it clears up this problem for you. Be sure to let us know the results.

Aug 23, 2011 at 5:23 AM

Works perfectly. 

Thanks for the update. Liking this library. I am not a ftp expert, so have just played with ftpclient class and so far its really good.