You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/04/30 13:58:52 UTC

svn commit: r165405 - /httpd/mod_python/trunk/lib/python/mod_python/Session.py

Author: nlehuen
Date: Sat Apr 30 04:58:51 2005
New Revision: 165405

URL: http://svn.apache.org/viewcvs?rev=165405&view=rev
Log:
Fix for MODPYTHON-50.

Modified:
    httpd/mod_python/trunk/lib/python/mod_python/Session.py

Modified: httpd/mod_python/trunk/lib/python/mod_python/Session.py
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/lib/python/mod_python/Session.py?rev=165405&r1=165404&r2=165405&view=diff
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/Session.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/Session.py Sat Apr 30 04:58:51 2005
@@ -155,10 +155,13 @@
         if config.has_key("ApplicationPath"):
             c.path = config["ApplicationPath"]
         else:
-            docroot = self._req.document_root()
             # the path where *Handler directive was specified
             dirpath = self._req.hlist.directory 
-            c.path = dirpath[len(docroot):]
+            if dirpath:
+                docroot = self._req.document_root()
+                c.path = dirpath[len(docroot):]
+            else:
+                c.path = '/'
 
             # Sometimes there is no path, e.g. when Location
             # is used. When Alias or UserDir are used, then