summaryrefslogtreecommitdiff
path: root/tests/fixtureapps/badcl.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/fixtureapps/badcl.py')
-rw-r--r--tests/fixtureapps/badcl.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/fixtureapps/badcl.py b/tests/fixtureapps/badcl.py
new file mode 100644
index 0000000..24067de
--- /dev/null
+++ b/tests/fixtureapps/badcl.py
@@ -0,0 +1,11 @@
+def app(environ, start_response): # pragma: no cover
+ body = b"abcdefghi"
+ cl = len(body)
+ if environ["PATH_INFO"] == "/short_body":
+ cl = len(body) + 1
+ if environ["PATH_INFO"] == "/long_body":
+ cl = len(body) - 1
+ start_response(
+ "200 OK", [("Content-Length", str(cl)), ("Content-Type", "text/plain")]
+ )
+ return [body]