aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2017-06-17 23:26:01 +0200
committerGitHub <noreply@github.com>2017-06-17 23:26:01 +0200
commit6d284f5a2e6f208eadaf911840eb94a59e023109 (patch)
treeece23a76dd3d1b39795acb91d403918b0e0dc45f
parent9c49943db42ea1d7ffe6c3e4c996919998f77779 (diff)
parentc5858463cac8cc3e86d6a2a655917ab1b98c241e (diff)
downloadmitmproxy-6d284f5a2e6f208eadaf911840eb94a59e023109.tar.gz
mitmproxy-6d284f5a2e6f208eadaf911840eb94a59e023109.tar.bz2
mitmproxy-6d284f5a2e6f208eadaf911840eb94a59e023109.zip
Merge pull request #2401 from ujjwal96/ip-formatting
Fix ip formatting in websocket messages
-rw-r--r--mitmproxy/websocket.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mitmproxy/websocket.py b/mitmproxy/websocket.py
index 2efa7ad1..30967a91 100644
--- a/mitmproxy/websocket.py
+++ b/mitmproxy/websocket.py
@@ -4,7 +4,7 @@ from typing import List, Optional
from mitmproxy import flow
from mitmproxy.net import websockets
from mitmproxy.types import serializable
-from mitmproxy.utils import strutils
+from mitmproxy.utils import strutils, human
class WebSocketMessage(serializable.Serializable):
@@ -94,8 +94,8 @@ class WebSocketFlow(flow.Flow):
def message_info(self, message: WebSocketMessage) -> str:
return "{client} {direction} WebSocket {type} message {direction} {server}{endpoint}".format(
type=message.type,
- client=repr(self.client_conn.address),
- server=repr(self.server_conn.address),
+ client=human.format_address(self.client_conn.address),
+ server=human.format_address(self.server_conn.address),
direction="->" if message.from_client else "<-",
endpoint=self.handshake_flow.request.path,
)