diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-02-18 12:08:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-18 12:08:54 +0100 |
commit | 4158a1ae555a44661bc7128308086a624bc56d70 (patch) | |
tree | 7b6c39321cc22db35270cb83e0ab9f04f5aef93d /examples/complex/dns_spoofing.py | |
parent | 6ef4f094b3e9abf904c796779e816b89efc9fe80 (diff) | |
parent | b9e31f213faa0607ca95841a5e9cd19b135a557f (diff) | |
download | mitmproxy-4158a1ae555a44661bc7128308086a624bc56d70.tar.gz mitmproxy-4158a1ae555a44661bc7128308086a624bc56d70.tar.bz2 mitmproxy-4158a1ae555a44661bc7128308086a624bc56d70.zip |
Merge pull request #2040 from mhils/request-host-header
Add "Request.host_header"
Diffstat (limited to 'examples/complex/dns_spoofing.py')
-rw-r--r-- | examples/complex/dns_spoofing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/complex/dns_spoofing.py b/examples/complex/dns_spoofing.py index c6d46b66..acda303d 100644 --- a/examples/complex/dns_spoofing.py +++ b/examples/complex/dns_spoofing.py @@ -34,7 +34,7 @@ class Rerouter: The original host header is retrieved early before flow.request is replaced by mitmproxy new outgoing request """ - flow.metadata["original_host"] = flow.request.headers["Host"] + flow.metadata["original_host"] = flow.request.host_header def request(self, flow): if flow.client_conn.ssl_established: @@ -53,7 +53,7 @@ class Rerouter: if m.group("port"): port = int(m.group("port")) - flow.request.headers["Host"] = host_header + flow.request.host_header = host_header flow.request.host = sni or host_header flow.request.port = port |