Tests: more Python tests.
This commit is contained in:
7
test/python/input_read_length/wsgi.py
Normal file
7
test/python/input_read_length/wsgi.py
Normal file
@@ -0,0 +1,7 @@
|
||||
def application(environ, start_response):
|
||||
|
||||
input_length = int(environ.get('HTTP_INPUT_LENGTH'))
|
||||
body = bytes(environ['wsgi.input'].read(input_length))
|
||||
|
||||
start_response('200', [('Content-Length', str(len(body)))])
|
||||
return [body]
|
||||
Reference in New Issue
Block a user