[Zope3-checkins] CVS: Zope3/src/zope/server/http - httptask.py:1.4 publisherhttpserver.py:1.9

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Feb 16 16:35:16 EST 2004


Update of /cvs-repository/Zope3/src/zope/server/http
In directory cvs.zope.org:/tmp/cvs-serv5858/src/zope/server/http

Modified Files:
	httptask.py publisherhttpserver.py 
Log Message:
Updated doc strings. Added documentation where necessary.


=== Zope3/src/zope/server/http/httptask.py 1.3 => 1.4 ===
--- Zope3/src/zope/server/http/httptask.py:1.3	Fri Jun  6 15:29:12 2003
+++ Zope3/src/zope/server/http/httptask.py	Mon Feb 16 16:34:38 2004
@@ -11,13 +11,13 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""
-This server uses asyncore to accept connections and do initial
-processing but threads to do work.
+"""HTTP Task
+
+An HTTP task that can execute an HTTP request with the help of the channel and
+the server it belongs to.
 
 $Id$
 """
-
 import socket
 import time
 
@@ -65,7 +65,7 @@
         self.version = version
 
     def service(self):
-        'See ITask'
+        """See zope.server.interfaces.ITask"""
         try:
             try:
                 self.start()
@@ -79,35 +79,35 @@
             self.channel.end_task(self.close_on_finish)
 
     def cancel(self):
-        'See ITask'
+        """See zope.server.interfaces.ITask"""
         self.channel.close_when_done()
 
     def defer(self):
-        'See ITask'
+        """See zope.server.interfaces.ITask"""
         pass
 
     def setResponseStatus(self, status, reason):
-        """See the IHeaderOutput interface."""
+        """See zope.server.interfaces.IHeaderOutput"""
         self.status = status
         self.reason = reason
 
     def setResponseHeaders(self, mapping):
-        """See the IHeaderOutput interface."""
+        """See zope.server.interfaces.IHeaderOutput"""
         self.response_headers.update(mapping)
 
     def appendResponseHeaders(self, lst):
-        """See the IHeaderOutput interface."""
+        """See zope.server.interfaces.IHeaderOutput"""
         accum = self.accumulated_headers
         if accum is None:
             self.accumulated_headers = accum = []
         accum.extend(lst)
 
     def wroteResponseHeader(self):
-        """See the IHeaderOutput interface."""
+        """See zope.server.interfaces.IHeaderOutput"""
         return self.wrote_header
 
     def setAuthUserName(self, name):
-        """See the IHeaderOutput interface."""
+        """See zope.server.interfaces.IHeaderOutput"""
         self.auth_user_name = name
 
     def prepareResponseHeaders(self):


=== Zope3/src/zope/server/http/publisherhttpserver.py 1.8 => 1.9 ===
--- Zope3/src/zope/server/http/publisherhttpserver.py:1.8	Thu Feb  5 17:19:10 2004
+++ Zope3/src/zope/server/http/publisherhttpserver.py	Mon Feb 16 16:34:38 2004
@@ -11,11 +11,10 @@
 # FOR A PARTICULAR PURPOSE.
 #
 ##############################################################################
-"""HTTP Server that uses the Zope Publisher for executing the request
+"""HTTP Server that uses the Zope Publisher for executing a task.
 
 $Id$
 """
-
 from zope.server.http.httpserver import HTTPServer
 from zope.publisher.publish import publish
 
@@ -24,15 +23,15 @@
     """Zope Publisher-specific HTTP Server"""
 
     def __init__(self, request_factory, sub_protocol=None, *args, **kw):
-        sub_protocol = str(sub_protocol)
 
+        # The common HTTP
         self.request_factory = request_factory
 
-        # An HTTP server is not limited to server up HTML; it can be
+        # An HTTP server is not limited to serving up HTML; it can be
         # used for other protocols, like XML-RPC, SOAP and so as well
         # Here we just allow the logger to output the sub-protocol type.
         if sub_protocol:
-            self.SERVER_IDENT += ' (%s)' %sub_protocol
+            self.SERVER_IDENT += ' (%s)' %str(sub_protocol)
 
         HTTPServer.__init__(self, *args, **kw)
 
@@ -47,10 +46,9 @@
         response.setHTTPTransaction(task)
         publish(request)
 
-class PMDBHTTPServer(PublisherHTTPServer):
-    """Enter the post-mortem debugger when there's an error
 
-    """
+class PMDBHTTPServer(PublisherHTTPServer):
+    """Enter the post-mortem debugger when there's an error"""
 
     def executeRequest(self, task):
         """Overrides HTTPServer.executeRequest()."""




More information about the Zope3-Checkins mailing list