diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/protocol/test_http1.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/mitmproxy/protocol/test_http1.py b/test/mitmproxy/protocol/test_http1.py index cd937ada..44a9effa 100644 --- a/test/mitmproxy/protocol/test_http1.py +++ b/test/mitmproxy/protocol/test_http1.py @@ -30,6 +30,16 @@ class TestInvalidRequests(tservers.HTTPProxyTest): assert b"Invalid HTTP request form" in r.content +class TestProxyMisconfiguration(tservers.TransparentProxyTest): + + def test_absolute_request(self): + p = self.pathoc() + with p.connect(): + r = p.request("get:'http://localhost:%d/p/200'" % self.server.port) + assert r.status_code == 400 + assert b"misconfiguration" in r.content + + class TestExpectHeader(tservers.HTTPProxyTest): def test_simple(self): |