Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: [FTP] patch

From: brett:codeconscious at: 18-Nov-2003 18:05

Hi Romano,
> This is my beta version of the patch. > > This is what I try to fix:
Great work! I have looked through your code and I have tried it with my server. It would be good to use it as a base to build on. Here's my comments and findings. ---NLST and "Blind" directories Having looked into NLST more I agree with you - let's just leave it out. If someone has a desperate need then maybe their situation will show a solution (custom code perhaps). Also for "blind" directories better to get what we have working and cleaned up and deal with the blind problem later if it arises. --- Parse-files I believe this function should return none! when parsing fails and a block when it succeeds. By returning none! an error can be raised within parse-dir-list. The problem at the moment is if parsing fails, inaccurate results can be returned without the user knowing. I've confirmed this with my dodgy test ftp server by emitting deliberately badly formated data (to simulate an unknown directory listing). ---Data-connect There's two instances of "error? catch". ---Parse-dir-list temp: 'list can be removed by putting the 'list as the parameter directly. Might be nice to make file-list local to the function. ---PWD and CWD PWD does not seem to appear at all in network tracing - my patch showed it coming just after SYST. I think you may have introduced a bug on CWD. I think that the path should not be modified if it beings with a "/". I suggest reverting to the original version of this. ---Unchanged words These appear to be no different to me: list-check list-file-check rmdir-check ---Globals I think parse-dir-list and others can be made local ---"Check you login" bug. This appears in the original scheme and your scheme, but not my scheme. I tried to identify what was going on but so far I have not found the problem. I assume it is to do with connection management and when things are closed. This is the sequence: site: ftp://XXXX:[YYY--codeconscious--com]/ print mold read site ; -> SUCCESS make-dir join site %test-a/test-b/ ; ERROR 550 print mold read site ; SUCCESS probe read join site %test-a/test-b/ ; ERROR 550 print mold read site ; SUCCESS probe read join site %test-a/ ; ERROR 550 print mold read site ; ERROR = Failed login to codeconscious...check your login probe read join site %test-b/ ; ERROR = Failed login to codeconscious...check your login print mold read site ; ERROR = Failed login to codeconscious...check your login A strange thing I noticed looking at the trace for the MAKE-DIR was PORT. I guess I wasn't expecting to see it for make-dir. This was the sequence in the trace for make-dir: USER PASS SYST PORT CWD PORT MKD Maybe some more network logging for the connections will help. Regards, Brett.