(self)
| 28 | assert f.request.url == "https://mitmproxy.org/img/test.jpg" |
| 29 | |
| 30 | def test_host_header(self): |
| 31 | mr = mapremote.MapRemote() |
| 32 | with taddons.context(mr) as tctx: |
| 33 | tctx.configure(mr, map_remote=["|http://[^/]+|http://example.com:4444"]) |
| 34 | f = tflow.tflow() |
| 35 | f.request.url = b"http://example.org/example" |
| 36 | f.request.headers["Host"] = "example.org" |
| 37 | mr.request(f) |
| 38 | assert f.request.headers.get("Host", "") == "example.com:4444" |
| 39 | |
| 40 | def test_is_killed(self): |
| 41 | mr = mapremote.MapRemote() |