[Zope-Checkins] CVS: Zope/ZServer - FCGIServer.py:1.13.16.2 HTTPResponse.py:1.36.16.1 PCGIServer.py:1.21.16.2

Brian Lloyd brian@zope.com
Mon, 15 Apr 2002 16:55:11 -0400


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

Modified Files:
      Tag: Zope-2_5-branch
	FCGIServer.py HTTPResponse.py PCGIServer.py 
Log Message:
Fixes for Hotfix issue.


=== Zope/ZServer/FCGIServer.py 1.13.16.1 => 1.13.16.2 ===
         self.stderr.close()
 
-        # The following was adapted from PCGIPipe.finish and PCGIPipe.close
-        # I don't really understand it enough to know if I got it right...
-        shutdown = 0
-        if self.headers.get('bobo-exception-type','') == \
-                'exceptions.SystemExit':
-            r = self.headers.get('bobo-exception-value','0')
-            try: r=string.atoi(r)
-            except: r = r and 1 or 0
-            shutdown = r,
-
         if not self.channel.closed:
             self.channel.push_with_producer(LoggingProducer(self.channel,
                                                             self.stdout.length,
                                                             'log_request'), 0)
-        if shutdown:
-            sys.ZServerExitCode = shutdown[0]
+        if self._shutdownRequested():
             self.channel.push(ShutdownProducer(), 0)
             Wakeup(lambda: asyncore.close_all())
         else:


=== Zope/ZServer/HTTPResponse.py 1.36 => 1.36.16.1 ===
                 lambda t=('E', id(self._request)): apply(DebugLogger.log, t)), 0)
             if self._shutdown:
-                try: r=self._shutdown[0]
-                except: r=0
-                sys.ZServerExitCode=r
                 self._channel.push(ShutdownProducer(), 0)
                 Wakeup()
             else:
@@ -270,9 +267,6 @@
             DebugLogger.log('E', id(self._request))
 
             if self._shutdown:
-                try: r=self._shutdown[0]
-                except: r=0
-                sys.ZServerExitCode=r
                 Wakeup(lambda: asyncore.close_all())
             else:
                 Wakeup()
@@ -283,13 +277,8 @@
     def flush(self): pass # yeah, whatever
     
     def finish(self, response):
-        if response.headers.get('bobo-exception-type', '') == \
-                'exceptions.SystemExit':
-
-            r=response.headers.get('bobo-exception-value','0')
-            try: r=int(r)
-            except: r = r and 1 or 0
-            self._shutdown=r,
+        if response._shutdownRequested():
+            self._shutdown = 1
         if response.headers.get('connection','') == 'close' or \
                 response.headers.get('Connection','') == 'close':
             self._close=1


=== Zope/ZServer/PCGIServer.py 1.21.16.1 => 1.21.16.2 ===
         
     def finish(self, response):
-        if response.headers.get('bobo-exception-type','') == \
-                'exceptions.SystemExit':
-            r=response.headers.get('bobo-exception-value','0')
-            try: r=string.atoi(r)
-            except: r = r and 1 or 0
-            self._shutdown=r,
+        if response._shutdownRequested():
+            self._shutdown = 1
         self._channel.reply_code=response.status