seisobs-webapp/wsgi/showEnv.py

19 lines
609 B
Python
Raw Permalink Normal View History

2017-12-03 12:23:41 +01:00
def application(environ, start_response):
"""
Function application - Wrapper to process wsgi request
:param environ: contains information on the wsgi environment
:type environ: dict
:param start_response: function to process response header by the wsgi server
:type start_response: function
:return: response to be sent to the client by the wsgi server
:rtype: list
:version: VVVVV
2017-12-03 12:23:41 +01:00
"""
from cgi import FieldStorage
form = FieldStorage(fp=environ['wsgi.input'], environ=environ)
start_response('200 OK', [('Content-Type', 'text/html')])
return [form]