aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2020-04-04 16:17:35 +0200
committerMaximilian Hils <git@maximilianhils.com>2020-04-04 16:19:24 +0200
commit5e0a89dbc8752f4e90cd8caa9702372a6546631b (patch)
tree316928675d004c48b8de1f32d54f5c215c9aee92 /mitmproxy
parentac83db3b840ecdbbc8ba232ae151b75d15e4a679 (diff)
downloadmitmproxy-5e0a89dbc8752f4e90cd8caa9702372a6546631b.tar.gz
mitmproxy-5e0a89dbc8752f4e90cd8caa9702372a6546631b.tar.bz2
mitmproxy-5e0a89dbc8752f4e90cd8caa9702372a6546631b.zip
don't force host header on outgoing requests
Diffstat (limited to 'mitmproxy')
-rw-r--r--mitmproxy/net/http/http1/assemble.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/mitmproxy/net/http/http1/assemble.py b/mitmproxy/net/http/http1/assemble.py
index 8b7246f7..d30a74a1 100644
--- a/mitmproxy/net/http/http1/assemble.py
+++ b/mitmproxy/net/http/http1/assemble.py
@@ -1,4 +1,3 @@
-import mitmproxy.net.http.url
from mitmproxy import exceptions
@@ -78,15 +77,7 @@ def _assemble_request_headers(request_data):
Args:
request_data (mitmproxy.net.http.request.RequestData)
"""
- headers = request_data.headers
- if "host" not in headers and request_data.scheme and request_data.host and request_data.port:
- headers = headers.copy()
- headers["host"] = mitmproxy.net.http.url.hostport(
- request_data.scheme,
- request_data.host,
- request_data.port
- )
- return bytes(headers)
+ return bytes(request_data.headers)
def _assemble_response_line(response_data):