Commit cb20756d authored by valtron's avatar valtron
Browse files

cleanup

parent 5234826a
......@@ -3,5 +3,4 @@
module app.py
except /robots.txt
}
root .
}
......@@ -7,23 +7,20 @@ def main(port):
print("Serving on port {}...".format(port))
httpd.serve_forever()
# A relatively simple WSGI application. It's going to print out the
# environment dictionary after being updated by setup_testing_defaults
def simple_app(environ, start_response):
status = '200 OK'
headers = [('Content-type', 'text/plain; charset=utf-8')]
start_response(status, headers)
ret = [
return [
b'=== Response ===\n',
] + [
('{}: {}\n'.format(key, environ.get(key)).encode('utf-8'))
for key in ['REQUEST_METHOD', 'PATH_INFO', 'QUERY_STRING']
] + [
b'================\n',
*(
('{}: {}\n'.format(key, environ.get(key)).encode('utf-8'))
for key in ['REQUEST_METHOD', 'PATH_INFO', 'QUERY_STRING']
),
b'================\n'
]
return ret
if __name__ == '__main__':
main(*sys.argv[1:])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment