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

Jim Fulton jim@zope.com
Tue, 26 Mar 2002 16:26:58 -0500


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

Modified Files:
      Tag: Zope-3x-branch
	z3.py 
Log Message:
Merged the publication refactoring branch into the main branch.


=== Zope3/z3.py 1.1.2.23 => 1.1.2.24 ===
           here] + filter(None, sys.path)
 
-from Zope.App.ZopePublication.ZopePublication import BrowserPublication
-from Zope.App.ZopePublication.ZopePublication import ZopePublication
+from Zope.App.ZopePublication.Browser.Publication import PublicationFactory
+from Zope.Publisher.Browser.BrowserRequest import BrowserRequest
+from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
+from Zope.App.ZopePublication.Browser.Publication import BrowserPublication
+from Zope.App.Security.SimpleSecurityPolicies \
+     import PermissiveSecurityPolicy
+from Zope.App.Security.SecurityManager import setSecurityPolicy
 from Zope.App.OFS.Folder.RootFolder import RootFolder
-from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
-     BrowserResponsePayload
+import asyncore, zLOG
+from Zope.Server import ZLogIntegration
 from Zope.Server.PublisherServers import PublisherHTTPServer
 from Zope.Server.TaskThreads import ThreadedTaskDispatcher
 from Zope.Server.HTTPServer import CommonHitLogger
+from Zope.App.ZopePublication.ZopePublication import ZopePublication
 
 import asyncore, zLOG
 
@@ -62,15 +68,20 @@
 
 
 publication = BrowserPublication(DB)
-request_payload = BrowserRequestPayload(publication)
-response_payload = BrowserResponsePayload()
+def request_factory(input_stream, output_steam, env):
+    request = BrowserRequest(input_stream, output_steam, env)
+    request.setPublication(publication)
+    return request
+
 
 td = ThreadedTaskDispatcher()
 td.setThreadCount(4)
 
 hit_log = CommonHitLogger()
-PublisherHTTPServer(request_payload, response_payload,
-                    '', 8080, task_dispatcher=td, verbose=1, hit_log=hit_log)
+PublisherHTTPServer(request_factory,
+                    '', 8880, task_dispatcher=td, verbose=1, hit_log=hit_log)
+
+
 
 try:
     asyncore.loop()