equal
deleted
inserted
replaced
651 |
651 |
652 def spliturl(req): |
652 def spliturl(req): |
653 def firstitem(query): |
653 def firstitem(query): |
654 return query.split('&', 1)[0].split(';', 1)[0] |
654 return query.split('&', 1)[0].split(';', 1)[0] |
655 |
655 |
656 root = req.env.get('SCRIPT_NAME', '') |
656 root = req.env.get('REQUEST_URI', '').split('?', 1)[0] |
|
657 pi = req.env.get('PATH_INFO', '') |
|
658 if pi: |
|
659 root = root[:-len(pi)] |
|
660 |
657 if req.env.has_key('REPO_NAME'): |
661 if req.env.has_key('REPO_NAME'): |
658 base = '/' + req.env['REPO_NAME'] |
662 base = '/' + req.env['REPO_NAME'] |
659 else: |
663 else: |
660 base = root |
664 base = root |
661 |
665 |
662 pi = req.env.get('PATH_INFO') |
|
663 if pi: |
666 if pi: |
664 while pi.startswith('//'): |
667 while pi.startswith('//'): |
665 pi = pi[1:] |
668 pi = pi[1:] |
666 if pi.startswith(base): |
669 if pi.startswith(base): |
667 if len(pi) > len(base): |
670 if len(pi) > len(base): |