Skip to content

Commit

Permalink
make HTTP work with latest version of twisted.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkerrin committed Jul 8, 2005
1 parent 49ece0a commit d05dc2e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions http.py
Expand Up @@ -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
Expand All @@ -29,7 +32,7 @@ def createHTTPFactory(db):
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)
Expand All @@ -42,8 +45,6 @@ def createPMHTTPFactory(db):
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)


0 comments on commit d05dc2e

Please sign in to comment.