From 62403a5bd8bf44b35f77d1e25a57bc0e12238b33 Mon Sep 17 00:00:00 2001 From: Ujjwal Verma Date: Mon, 19 Jun 2017 03:18:38 +0530 Subject: Fixes #2197 --- mitmproxy/master.py | 5 +++++ 1 file changed, 5 insertions(+) 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, -- cgit v1.2.3