diff options
author | Samoilenko Roman <ttahabatt@gmail.com> | 2018-01-14 22:54:09 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2018-01-14 21:54:09 +0100 |
commit | 6b22da6a34f9ab4809bac5d2c940a23e165012ee (patch) | |
tree | aa3890658e6dadd7073da9e24db4d7743a38b089 /test | |
parent | 9a43ff5da107a862169d75fa49fb0d43b172cd3c (diff) | |
download | mitmproxy-6b22da6a34f9ab4809bac5d2c940a23e165012ee.tar.gz mitmproxy-6b22da6a34f9ab4809bac5d2c940a23e165012ee.tar.bz2 mitmproxy-6b22da6a34f9ab4809bac5d2c940a23e165012ee.zip |
Fix #2768 (#2778)
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/proxy/test_server.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/mitmproxy/proxy/test_server.py b/test/mitmproxy/proxy/test_server.py index 8ec83d18..87ec443a 100644 --- a/test/mitmproxy/proxy/test_server.py +++ b/test/mitmproxy/proxy/test_server.py @@ -511,6 +511,14 @@ class TestReverse(tservers.ReverseProxyTest, CommonMixin, TcpMixin): req = self.master.state.flows[0].request assert req.host_header == "127.0.0.1" + def test_selfconnection(self): + self.options.mode = "reverse:http://127.0.0.1:0" + + p = self.pathoc() + with p.connect(): + p.request("get:/") + assert self.master.has_log("The proxy shall not connect to itself.") + class TestReverseSSL(tservers.ReverseProxyTest, CommonMixin, TcpMixin): reverse = True |