From abbbf9a3a4bd78b908ffcf82b73966bb14fa8926 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sun, 10 Apr 2016 23:51:43 +0200 Subject: [PATCH] Add testcase for #822 --- tests/test_serving.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_serving.py b/tests/test_serving.py index a2c03ee26..f44c3259f 100644 --- a/tests/test_serving.py +++ b/tests/test_serving.py @@ -62,6 +62,18 @@ def app(environ, start_response): assert res.read() == b'YES' +def test_double_slash_path(dev_server): + server = dev_server(''' + def app(environ, start_response): + assert 'fail' not in environ['HTTP_HOST'] + start_response('200 OK', [('Content-Type', 'text/plain')]) + return [b'YES'] + ''') + + r = requests.get(server.url + '//fail') + assert r.content == b'YES' + + def test_broken_app(dev_server): server = dev_server(''' def app(environ, start_response):