summaryrefslogtreecommitdiffhomepage
path: root/test/python/mirror
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/python/mirror/wsgi.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/python/mirror/wsgi.py b/test/python/mirror/wsgi.py
new file mode 100644
index 00000000..e4df67ec
--- /dev/null
+++ b/test/python/mirror/wsgi.py
@@ -0,0 +1,10 @@
+def application(environ, start_response):
+
+ content_length = int(environ.get('CONTENT_LENGTH', 0))
+ body = bytes(environ['wsgi.input'].read(content_length))
+
+ start_response('200', [
+ ('Content-Type', environ.get('CONTENT_TYPE')),
+ ('Content-Length', str(len(body)))
+ ])
+ return [body]