[Zope3-checkins] SVN: Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py make HTTP work with latest version of twisted.

Michael Kerrin michael.kerrin at openapp.biz
Fri Jul 8 07:29:08 EDT 2005


Log message for revision 31031:
  make HTTP work with latest version of twisted.
  

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-07-08 11:28:24 UTC (rev 31030)
+++ Zope3/branches/srichter-twisted-integration/src/zope/app/server/http.py	2005-07-08 11:29:08 UTC (rev 31031)
@@ -17,8 +17,11 @@
 """
 import twisted.web2.wsgi
 import twisted.web2.server
-import twisted.web2.http
 import twisted.web2.log
+try:
+    from twisted.web2.http import HTTPFactory
+except ImportError:
+    from twisted.web2.channel.http import HTTPFactory
 
 from zope.app.server.server import ServerType, SSLServerType
 from zope.app import wsgi
@@ -29,7 +32,7 @@
         wsgi.WSGIPublisherApplication(db))
     resource = twisted.web2.log.LogWrapperResource(resource)
     
-    return twisted.web2.http.HTTPFactory(twisted.web2.server.Site(resource))
+    return HTTPFactory(twisted.web2.server.Site(resource))
 
 
 http = ServerType(createHTTPFactory, 8080)
@@ -42,8 +45,6 @@
         wsgi.PMDBWSGIPublisherApplication(db))
     resource = twisted.web2.log.LogWrapperResource(resource)
     
-    return twisted.web2.http.HTTPFactory(twisted.web2.server.Site(resource))
+    return HTTPFactory(twisted.web2.server.Site(resource))
 
 pmhttp = ServerType(createPMHTTPFactory, 8080)
-
-



More information about the Zope3-Checkins mailing list