comparison mercurial/hgweb/hgwebdir_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
comparison
equal deleted inserted replaced
6456:db5324d3c257 6459:8189e03adb44
188 return u.config(section, name, default, untrusted=True) 188 return u.config(section, name, default, untrusted=True)
189 189
190 if u.configbool("web", "hidden", untrusted=True): 190 if u.configbool("web", "hidden", untrusted=True):
191 continue 191 continue
192 192
193 parts = [req.env['PATH_INFO'].rstrip('/'), name] 193 parts = [name]
194 if 'PATH_INFO' in req.env:
195 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
194 if req.env['SCRIPT_NAME']: 196 if req.env['SCRIPT_NAME']:
195 parts.insert(0, req.env['SCRIPT_NAME']) 197 parts.insert(0, req.env['SCRIPT_NAME'])
196 url = ('/'.join(parts).replace("//", "/")) + '/' 198 url = ('/'.join(parts).replace("//", "/")) + '/'
197 199
198 # update time with local timezone 200 # update time with local timezone