[Zope-Checkins] CVS: Zope/lib/python/ZServer - FCGIServer.py:1.22.8.1 HTTPServer.py:1.46.2.2 PCGIServer.py:1.26.8.2

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


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

Modified Files:
      Tag: Zope-2_7-branch
	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.22.8.1 ===
--- 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:43 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.46.2.1 => 1.46.2.2 ===
--- Zope/lib/python/ZServer/HTTPServer.py:1.46.2.1	Tue Oct 21 11:27:55 2003
+++ Zope/lib/python/ZServer/HTTPServer.py	Sun Dec 14 22:11:43 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.26.8.1 => 1.26.8.2 ===
--- Zope/lib/python/ZServer/PCGIServer.py:1.26.8.1	Mon Nov 17 17:34:21 2003
+++ Zope/lib/python/ZServer/PCGIServer.py	Sun Dec 14 22:11:43 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