[Zope-Checkins] CVS: Zope3 - z3.py:1.1.2.3

Shane Hathaway shane@digicool.com
Mon, 19 Nov 2001 15:25:30 -0500


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv21252

Modified Files:
      Tag: Zope-3x-branch
	z3.py 
Log Message:
Reoriented payload objects.  They now return the publication object.
Also made Publish.py easier to understand.


=== Zope3/z3.py 1.1.2.2 => 1.1.2.3 ===
 
 from Zope.App.ZopePublication.ZopePublication import ZopePublication
+from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
+     BrowserResponsePayload
 import Zope.Server, asyncore, zLOG
 
 Zope.Server.setNumberOfThreads(4)
@@ -22,7 +24,9 @@
 
 server = Zope.Server.zhttp_server('', 8080)
 publication = ZopePublication(App())
-handler = Zope.Server.zhttp_handler(publication, '', {})
+request_payload = BrowserRequestPayload(publication)
+response_payload = BrowserResponsePayload()
+handler = Zope.Server.zhttp_handler(request_payload, response_payload, '', {})
 server.install_handler(handler)
 asyncore.loop()
 sys.exit(0)