aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/master.py
diff options
context:
space:
mode:
authorUjjwal Verma <ujjwalverma1111@gmail.com>2017-06-19 03:18:38 +0530
committerUjjwal Verma <ujjwalverma1111@gmail.com>2017-06-19 03:18:38 +0530
commit62403a5bd8bf44b35f77d1e25a57bc0e12238b33 (patch)
treed849b6e79d7ec960cb6fb11c827467e71b82f9b7 /mitmproxy/master.py
parent6d284f5a2e6f208eadaf911840eb94a59e023109 (diff)
downloadmitmproxy-62403a5bd8bf44b35f77d1e25a57bc0e12238b33.tar.gz
mitmproxy-62403a5bd8bf44b35f77d1e25a57bc0e12238b33.tar.bz2
mitmproxy-62403a5bd8bf44b35f77d1e25a57bc0e12238b33.zip
Fixes #2197
Diffstat (limited to 'mitmproxy/master.py')
-rw-r--r--mitmproxy/master.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mitmproxy/master.py b/mitmproxy/master.py
index b17f7e5d..9e3550da 100644
--- a/mitmproxy/master.py
+++ b/mitmproxy/master.py
@@ -162,6 +162,11 @@ class Master:
f.response = None
f.error = None
+ if f.request.http_version == "HTTP/2.0":
+ f.request.http_version = "HTTP/1.1"
+ host = f.request.headers.pop(":authority")
+ f.request.headers.insert(0, "host", host)
+
rt = http_replay.RequestReplayThread(
self.server.config,
f,