aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-21 18:31:12 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-21 18:31:12 -0700
commit0911f4908b8481e7793b0d3632add7112f69e9a9 (patch)
tree2837ea4efdebfa9f734205374c743decbf16398c
parentf5841c705c6ddf4d04384cf925c80af0831653d1 (diff)
downloadmitmproxy-0911f4908b8481e7793b0d3632add7112f69e9a9.tar.gz
mitmproxy-0911f4908b8481e7793b0d3632add7112f69e9a9.tar.bz2
mitmproxy-0911f4908b8481e7793b0d3632add7112f69e9a9.zip
fix #1391
-rw-r--r--mitmproxy/console/common.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mitmproxy/console/common.py b/mitmproxy/console/common.py
index 281fd658..6f0b46dd 100644
--- a/mitmproxy/console/common.py
+++ b/mitmproxy/console/common.py
@@ -216,7 +216,7 @@ def copy_to_clipboard_or_prompt(data):
def format_flow_data(key, scope, flow):
- data = ""
+ data = b""
if scope in ("q", "b"):
request = flow.request.copy()
request.decode(strict=False)
@@ -230,7 +230,7 @@ def format_flow_data(key, scope, flow):
raise ValueError("Unknown key: {}".format(key))
if scope == "b" and flow.request.raw_content and flow.response:
# Add padding between request and response
- data += "\r\n" * 2
+ data += b"\r\n" * 2
if scope in ("s", "b") and flow.response:
response = flow.response.copy()
response.decode(strict=False)
@@ -293,7 +293,7 @@ def ask_save_body(scope, flow):
)
elif scope == "b" and request_has_content and response_has_content:
ask_save_path(
- (flow.request.get_content(strict=False) + "\n" +
+ (flow.request.get_content(strict=False) + b"\n" +
flow.response.get_content(strict=False)),
"Save request & response content to"
)