[Zope-Checkins] CVS: Zope/lib/python/ZServer - FCGIServer.py:1.23 HTTPServer.py:1.48 PCGIServer.py:1.28

Chris McDonough chrism at zopemafia.com
Sun Dec 14 22:11:26 EST 2003


Update of /cvs-repository/Zope/lib/python/ZServer
In directory cvs.zope.org:/tmp/cvs-serv6943

Modified Files:
	FCGIServer.py HTTPServer.py PCGIServer.py 
Log Message:
Check for both stringtype and unicodetype to prevent future problems.


=== Zope/lib/python/ZServer/FCGIServer.py 1.22 => 1.23 ===
--- Zope/lib/python/ZServer/FCGIServer.py:1.22	Tue Mar 18 16:15:14 2003
+++ Zope/lib/python/ZServer/FCGIServer.py	Sun Dec 14 22:11:25 2003
@@ -45,8 +45,8 @@
 from cStringIO import StringIO
 from tempfile import TemporaryFile
 import socket, string, os, sys, time
-from types import StringType
 import thread
+from types import StringTypes
 
 tz_for_log = compute_timezone_for_log()
 
@@ -558,7 +558,7 @@
         self.closed=1
         while self.producer_fifo:
             p=self.producer_fifo.first()
-            if p is not None and type(p) != StringType:
+            if p is not None and not isinstance(p, StringTypes):
                 p.more() # free up resources held by producer
             self.producer_fifo.pop()
         asyncore.dispatcher.close(self)


=== Zope/lib/python/ZServer/HTTPServer.py 1.47 => 1.48 ===
--- Zope/lib/python/ZServer/HTTPServer.py:1.47	Tue Oct 21 10:49:48 2003
+++ Zope/lib/python/ZServer/HTTPServer.py	Sun Dec 14 22:11:25 2003
@@ -35,10 +35,10 @@
 import re
 import os
 import posixpath
-import types
 import thread
 import time
 import socket
+from types import StringTypes
 from cStringIO import StringIO
 
 from PubCore import handle
@@ -338,7 +338,7 @@
             self.current_request=None
         while self.producer_fifo:
             p=self.producer_fifo.first()
-            if p is not None and type(p) != types.StringType:
+            if p is not None and not isinstance(p, StringTypes):
                 p.more() # free up resources held by producer
             self.producer_fifo.pop()
         dispatcher.close(self)


=== Zope/lib/python/ZServer/PCGIServer.py 1.27 => 1.28 ===
--- Zope/lib/python/ZServer/PCGIServer.py:1.27	Tue Nov 18 08:17:18 2003
+++ Zope/lib/python/ZServer/PCGIServer.py	Sun Dec 14 22:11:25 2003
@@ -47,7 +47,7 @@
 from cStringIO import StringIO
 from tempfile import TemporaryFile
 import socket, string, os, sys, time
-from types import StringType, TupleType
+from types import TupleType, StringTypes
 
 tz_for_log=compute_timezone_for_log()
 
@@ -203,7 +203,7 @@
         self.closed=1
         while self.producer_fifo:
             p=self.producer_fifo.first()
-            if p is not None and type(p) != StringType:
+            if p is not None and not isinstance(p, StringTypes):
                 p.more() # free up resources held by producer
             self.producer_fifo.pop()
         asyncore.dispatcher.close(self)




More information about the Zope-Checkins mailing list