Created
January 15, 2012 09:00
-
-
Save longfin/1615142 to your computer and use it in GitHub Desktop.
environ dump wsgi app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def dump_environ_app(environ, start_response): | |
response_body = "\n".join(["{0}: {1}".format(k, environ[k]) for k in environ.keys()]) | |
status = '200 OK' | |
response_headers = [('Content-Type', 'text/plain'), | |
('Content-Length', str(len(response_body)))] | |
start_response(status, response_headers) | |
return [response_body] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment