aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-02-17 23:43:18 +0100
committerMaximilian Hils <git@maximilianhils.com>2017-02-18 00:13:14 +0100
commitb9e31f213faa0607ca95841a5e9cd19b135a557f (patch)
tree76ee5ba7e6cb9636bf9142e68713fb5bf4849183 /examples
parent49c8e19f8082840027cc4586d40dcb8b26d4db28 (diff)
downloadmitmproxy-b9e31f213faa0607ca95841a5e9cd19b135a557f.tar.gz
mitmproxy-b9e31f213faa0607ca95841a5e9cd19b135a557f.tar.bz2
mitmproxy-b9e31f213faa0607ca95841a5e9cd19b135a557f.zip
.headers["host"] -> .host_header
Diffstat (limited to 'examples')
-rw-r--r--examples/complex/dns_spoofing.py4
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