Log message for revision 112836:
  Get quickstart page rendering under plain paste config.

Changed:
  U   Zope/branches/tseaver-fix_wsgi/setup.py
  U   Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py
  U   Zope/branches/tseaver-fix_wsgi/src/Zope2/Startup/run.py

-=-
Modified: Zope/branches/tseaver-fix_wsgi/setup.py
===================================================================
--- Zope/branches/tseaver-fix_wsgi/setup.py     2010-05-29 04:24:52 UTC (rev 
112835)
+++ Zope/branches/tseaver-fix_wsgi/setup.py     2010-05-29 05:21:19 UTC (rev 
112836)
@@ -117,6 +117,9 @@
     include_package_data=True,
     zip_safe=False,
     entry_points={
+       'paste.app_factory': [
+          'main=Zope2.Startup.run:make_wsgi_app',
+       ],
        'console_scripts': [
           'mkzeoinstance=zope.mkzeoinstance:main',
           'mkzopeinstance=Zope2.utilities.mkzopeinstance:main',

Modified: Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py
===================================================================
--- Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py      
2010-05-29 04:24:52 UTC (rev 112835)
+++ Zope/branches/tseaver-fix_wsgi/src/ZPublisher/WSGIPublisher.py      
2010-05-29 05:21:19 UTC (rev 112836)
@@ -168,7 +168,7 @@
     response = WSGIResponse(stdout=stdout, stderr=stderr)
     response._http_version = environ['SERVER_PROTOCOL'].split('/')[1]
     response._http_connection = environ.get('CONNECTION_TYPE', 'close')
-    response._server_version = environ['SERVER_SOFTWARE']
+    response._server_version = environ.get('SERVER_SOFTWARE')
 
     request = HTTPRequest(environ['wsgi.input'], environ, response)
 
@@ -198,4 +198,3 @@
 
     # Return the result body iterable.
     return result
-

Modified: Zope/branches/tseaver-fix_wsgi/src/Zope2/Startup/run.py
===================================================================
--- Zope/branches/tseaver-fix_wsgi/src/Zope2/Startup/run.py     2010-05-29 
04:24:52 UTC (rev 112835)
+++ Zope/branches/tseaver-fix_wsgi/src/Zope2/Startup/run.py     2010-05-29 
05:21:19 UTC (rev 112836)
@@ -52,6 +52,22 @@
     App.config.setConfiguration(opts.configroot)
     return opts
 
+def make_wsgi_app(global_config, zope_conf):
+    from App.config import setConfiguration
+    from Zope2.Startup import get_starter
+    from Zope2.Startup.handlers import handleConfig
+    from Zope2.Startup.options import ZopeOptions
+    from ZPublisher.WSGIPublisher import publish_module
+    starter = get_starter()
+    opts = ZopeOptions()
+    opts.configfile = zope_conf
+    opts.realize(args=(), progname='Zope2WSGI', raise_getopt_errs=False)
+    handleConfig(opts.configroot, opts.confighandlers)
+    setConfiguration(opts.configroot)
+    starter.setConfiguration(opts.configroot)
+    starter.prepare()
+    return publish_module
+
 if __name__ == '__main__':
     run()
 

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to