diff options
Diffstat (limited to 'test/python/input_read_length')
-rw-r--r-- | test/python/input_read_length/wsgi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/python/input_read_length/wsgi.py b/test/python/input_read_length/wsgi.py new file mode 100644 index 00000000..9d209556 --- /dev/null +++ b/test/python/input_read_length/wsgi.py @@ -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] |