summaryrefslogtreecommitdiff
path: root/tests/fixtureapps/badcl.py
blob: 24067de4193e6dd68cfb8719c129ebb0cf36acb1 (plain)
1
2
3
4
5
6
7
8
9
10
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]