mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-08-29 20:54:04 +00:00
25 lines
638 B
Python
25 lines
638 B
Python
def application(env, start_response):
|
|
|
|
|
|
if env['REQUEST_METHOD'] == 'POST':
|
|
start_response('200 Ok', [('Content-type', 'text/plain')])
|
|
#for x in env['wsgi.input']:
|
|
# yield x
|
|
body = env['wsgi.input'].readline()
|
|
print body
|
|
body += env['wsgi.input'].read(100)
|
|
body += env['wsgi.input'].read(100)
|
|
body += env['wsgi.input'].read()
|
|
return body
|
|
else:
|
|
start_response('200 Ok', [('Content-type', 'text/html')])
|
|
return """
|
|
<form method="POST" enctype="multipart/form-data">
|
|
<textarea name="pluto">
|
|
</textarea>
|
|
<input type="test" name="pippo" />
|
|
<input type="submit" value="invia" />
|
|
</form>
|
|
"""
|
|
|