[Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py foom changed the web2 API a bit, so let's update our code to this new API.

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu May 5 15:49:32 EDT 2005


Log message for revision 30254:
  foom changed the web2 API a bit, so let's update our code to this new API. 
  He also merged in my commona access logger code, so we do not have to 
  worry about logging anymore. The only task left is to get to the user info 
  somehow, but foom will provide a hook for me soon.
  
  

Changed:
  U   Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py

-=-
Modified: Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py
===================================================================
--- Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py	2005-05-05 17:03:34 UTC (rev 30253)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py	2005-05-05 19:49:32 UTC (rev 30254)
@@ -17,6 +17,8 @@
 """
 import twisted.web2.wsgi
 import twisted.web2.server
+import twisted.web2.http
+import twisted.web2.log
 
 from zope.app.server.server import ServerType, SSLServerType
 from zope.app import wsgi
@@ -25,8 +27,9 @@
 def createHTTPFactory(db):
     resource = twisted.web2.wsgi.WSGIResource(
         wsgi.WSGIPublisherApplication(db))
+    resource = twisted.web2.log.LogWrapperResource(resource)
     
-    return twisted.web2.server.Site(resource)
+    return twisted.web2.http.HTTPFactory(twisted.web2.server.Site(resource))
 
 
 http = ServerType(createHTTPFactory, 8080)
@@ -37,8 +40,9 @@
 def createPMHTTPFactory(db):
     resource = twisted.web2.wsgi.WSGIResource(
         wsgi.PMDBWSGIPublisherApplication(db))
+    resource = twisted.web2.log.LogWrapperResource(resource)
     
-    return twisted.web2.server.Site(resource)
+    return twisted.web2.http.HTTPFactory(twisted.web2.server.Site(resource))
 
 pmhttp = ServerType(createPMHTTPFactory, 8080)
 



More information about the Zope3-Checkins mailing list