[z3-checkins] r10722 - z3/modzope/trunk/src/modzope
philikon at codespeak.net
philikon at codespeak.net
Sat Apr 16 12:06:59 MEST 2005
Author: philikon
Date: Sat Apr 16 12:06:59 2005
New Revision: 10722
Modified:
z3/modzope/trunk/src/modzope/wsgi.py
Log:
fix the weird URL problem that zope.publisher had. the reason was
SCRIPT_NAME in the request environment. zope.publisher chokes on that
and thinks it has to append it to PATH_INFO...
Not sure if this is actually bad behaviour on zope.publisher's part
or SCRIPT_NAME just doesn't belong in non-cgi environments
Modified: z3/modzope/trunk/src/modzope/wsgi.py
==============================================================================
--- z3/modzope/trunk/src/modzope/wsgi.py (original)
+++ z3/modzope/trunk/src/modzope/wsgi.py Sat Apr 16 12:06:59 2005
@@ -147,14 +147,10 @@
use."""
req.add_common_vars()
env = req.subprocess_env.copy()
- # zope.publisher needs this
- # maybe use req.parsed_uri[apache.URI_PATH]?
+ # zope.publisher needs PATH_INFO instead of SCRIPT_NAME (the
+ # latter confuses it badly)
env['PATH_INFO'] = req.uri
-
- if len(req.path_info) > 0:
- env["SCRIPT_NAME"] = req.uri[:-len(req.path_info)]
- else:
- env["SCRIPT_NAME"] = req.uri
+ env['SCRIPT_NAME'] = ''
if req.headers_in.has_key("authorization"):
env["HTTP_AUTHORIZATION"] = req.headers_in["authorization"]
More information about the z3-checkins
mailing list