1import six
2
3def application(environ, start_response):
4    start_response('200 OK', [('Content-type', 'text/plain')])
5    body = 'user: %s' % environ.get('app.user')
6    if six.PY3:
7        body = body.encode('ascii')
8    return [body]
9