[ZCM] [ZC] 386/ 2 Resolve "medusa ftp and ncftp client"

Collector: Zope Bugs, Features, and Patches ... zope-coders@zope.org
Thu, 09 May 2002 13:01:41 -0400


Issue #386 Update (Resolve) "medusa ftp and ncftp client"
 Status Resolved, ZServer/bug+solution low
To followup, visit:
  http://collector.zope.org/Zope/386

==============================================================
= Resolve - Entry #2 by ajung on May 9, 2002 1:01 pm

 Status: Pending => Resolved

Excellent workaround. I have been hunting for this problem
since ages but without success. The fix is now in the CVS.

Thanks,
Andreas
________________________________________
= Request - Entry #1 by Anonymous User on May 9, 2002 12:49 pm

If we try to access zope's ftp server from ncftp client (possibly others, didn't test) then we get locked with "Logging in...".
After some head banging on the wall, I found that the last message from HELP SITE command issued from ncftp was "214\r\n" while in other servers I found it to be "214 **whatever**\r\n".
Without really believing in this sittuation I added a single space into medusa's ftp_server last 214 response, and, hey, they did the trick.
I haven't got the slightest idea if there is something in some RFC about this or not, but since this shouldn't break any other client, why not support ncftp (which is my favorite, btw)?

patch follows:
---------------8<--------------------
--- zope.orig/ZServer/medusa/ftp_server.py	Mon Jul  9 16:13:06 2001
+++ zope/ZServer/medusa/ftp_server.py	Thu May  9 17:12:52 2002
@@ -680,9 +680,9 @@
         if help_lines:
             self.push ('214-The following commands are recognized\r\n')
             self.push_with_producer (producers.lines_producer (help_lines))
-            self.push ('214\r\n')
+            self.push ('214 \r\n')
         else:
-            self.push ('214-\r\n\tHelp Unavailable\r\n214\r\n')
+            self.push ('214-\r\n\tHelp Unavailable\r\n214 \r\n')
             
 class ftp_server (asyncore.dispatcher):
         # override this to spawn a different FTP channel class.
------------------8<--------------------------
==============================================================