[Zope-Checkins] CVS: Zope/ZServer/medusa - ftp_server.py:1.17.20.1 http_server.py:1.26.8.1 asyncore.py.old:NONE

Shane Hathaway shane@digicool.com
Thu, 9 Aug 2001 13:33:58 -0400


Update of /cvs-repository/Zope/ZServer/medusa
In directory cvs.zope.org:/tmp/cvs-serv29115/ZServer/medusa

Modified Files:
      Tag: NR-branch
	ftp_server.py http_server.py 
Removed Files:
      Tag: NR-branch
	asyncore.py.old 
Log Message:
Sync NR-branch with trunk.  Sorry about so many checkin messages...


=== Zope/ZServer/medusa/ftp_server.py 1.17 => 1.17.20.1 ===
             # put 'events' in the producer fifo.  to do this cleanly we need
             # to reposition the 'producer' fifo as an 'event' fifo.
+
+    # dummy function to suppress warnings caused by some FTP clients
+    def handle_connect(self): pass
             
     def close (self):
         c = self.channel


=== Zope/ZServer/medusa/http_server.py 1.26 => 1.26.8.1 ===
         if auth is not None:
             if string.lower(auth[:6]) == 'basic ':
-                [name,password] = string.split(
-                    base64.decodestring(
-                    string.split(auth)[-1]), ':')
-  
+                try: decoded=base64.decodestring(auth[6:])
+                except base64.binascii.Error: decoded=''
+                t = string.split(decoded, ':', 1)
+                if len(t) < 2:
+                    name = 'Unknown (bad auth string)'
+                else:
+                    name = t[0]
 
         self.channel.server.logger.log (
             self.channel.addr[0],
@@ -714,7 +717,7 @@
 
 def crack_request (r):
     m = REQUEST.match (r)
-    if m.end() == len(r):
+    if m is not None and m.end() == len(r):
         if m.group(3):
             version = m.group(5)
         else:

=== Removed File Zope/ZServer/medusa/asyncore.py.old ===