comparison mercurial/hgweb/hgweb_mod.py @ 4348:b633f470944e

hgweb: fix rfind bug in PATH_INFO handling
author Matt Mackall <mpm@selenic.com>
date Mon, 16 Apr 2007 09:51:50 -0500
parents 26a2fa9433b8
children 69109aa0cddd
comparison
equal deleted inserted replaced
4345:9bfe93edfbb0 4348:b633f470944e
714 pi = normurl(req.env.get('PATH_INFO', '')) 714 pi = normurl(req.env.get('PATH_INFO', ''))
715 if pi: 715 if pi:
716 # strip leading / 716 # strip leading /
717 pi = pi[1:] 717 pi = pi[1:]
718 if pi: 718 if pi:
719 root = root[:root.rfind(root, pi)] 719 root = root[:root.rfind(pi)]
720 if req.env.has_key('REPO_NAME'): 720 if req.env.has_key('REPO_NAME'):
721 rn = req.env['REPO_NAME'] + '/' 721 rn = req.env['REPO_NAME'] + '/'
722 root += rn 722 root += rn
723 query = pi[len(rn):] 723 query = pi[len(rn):]
724 else: 724 else: