• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1from paste import request
2
3def urlparser_hook(environ):
4    first, rest = request.path_info_split(environ.get('PATH_INFO', ''))
5    if not first:
6        # No username
7        return
8    environ['app.user'] = first
9    environ['SCRIPT_NAME'] += '/' + first
10    environ['PATH_INFO'] = rest
11