comparison mercurial/hgweb/hgweb_mod.py @ 3606:f8589028a7fa

hgweb: split URLs containing spaces or other escaped characters correctly
author Brendan Cully <brendan@kublai.com>
date Tue, 31 Oct 2006 18:10:23 -0800
parents fc34fd58ae7b
children 44cd1eb72fd7
comparison
equal deleted inserted replaced
3605:9d815b074dcb 3606:f8589028a7fa
706 tl = len(url) > 1 and url.endswith('/') and '/' or '' 706 tl = len(url) > 1 and url.endswith('/') and '/' or ''
707 707
708 return '%s%s%s' % (url.startswith('/') and '/' or '', 708 return '%s%s%s' % (url.startswith('/') and '/' or '',
709 inner, tl) 709 inner, tl)
710 710
711 root = normurl(req.env.get('REQUEST_URI', '').split('?', 1)[0]) 711 root = normurl(urllib.unquote(req.env.get('REQUEST_URI', '').split('?', 1)[0]))
712 pi = normurl(req.env.get('PATH_INFO', '')) 712 pi = normurl(req.env.get('PATH_INFO', ''))
713 if pi: 713 if pi:
714 # strip leading / 714 # strip leading /
715 pi = pi[1:] 715 pi = pi[1:]
716 if pi: 716 if pi: