File: __init__.py

package info (click to toggle)
paste 1.7.1-1%2Blenny1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,132 kB
  • ctags: 2,681
  • sloc: python: 20,173; sh: 73; makefile: 50
file content (10 lines) | stat: -rw-r--r-- 289 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
from paste import request

def urlparser_hook(environ):
    first, rest = request.path_info_split(environ.get('PATH_INFO', ''))
    if not first:
        # No username
        return
    environ['app.user'] = first
    environ['SCRIPT_NAME'] += '/' + first
    environ['PATH_INFO'] = rest