diff options
author | Ujjwal Verma <ujjwalverma1111@gmail.com> | 2017-02-10 01:26:06 +0530 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2017-02-09 20:56:06 +0100 |
commit | d6465b907f238f50c20c51304723260c9aaa61ab (patch) | |
tree | c70535fa648fc1f14e135412e23f60cd548ef13b /test | |
parent | 380ff50e57a56d2ff25f04350341ae013dcd2443 (diff) | |
download | mitmproxy-d6465b907f238f50c20c51304723260c9aaa61ab.tar.gz mitmproxy-d6465b907f238f50c20c51304723260c9aaa61ab.tar.bz2 mitmproxy-d6465b907f238f50c20c51304723260c9aaa61ab.zip |
Closes #1580 Gives warning when explicit proxy configured in transparent mode (#1996)
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): |