Skip to content

Commit

Permalink
foom changed the web2 API a bit, so let's update our code to this new…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
strichter committed May 5, 2005
1 parent 31efcfa commit 78dbf48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -37,8 +40,9 @@ def createHTTPFactory(db):
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)

Expand Down

0 comments on commit 78dbf48

Please sign in to comment.