diff mercurial/hgweb/hgweb_mod.py @ 6459:8189e03adb44

hgweb: make hgwebdir work in the absence of PATH_INFO Thanks to Andrea Arcangeli for reporting and an initial patch.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 03 Apr 2008 13:14:43 +0200
parents d2bb66a8a435
children a63aed912e54
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Thu Apr 03 11:11:31 2008 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Apr 03 13:14:43 2008 +0200
@@ -172,8 +172,8 @@
         if 'REPO_NAME' in req.env:
             req.url += req.env['REPO_NAME'] + '/'
 
-        if req.env.get('PATH_INFO'):
-            parts = req.env.get('PATH_INFO').strip('/').split('/')
+        if 'PATH_INFO' in req.env:
+            parts = req.env['PATH_INFO'].strip('/').split('/')
             repo_parts = req.env.get('REPO_NAME', '').split('/')
             if parts[:len(repo_parts)] == repo_parts:
                 parts = parts[len(repo_parts):]