diff --git a/CHANGELOG.md b/CHANGELOG.md index 6670055d3..39d55eab7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased: mitmproxy next +* Fix a bug where the direction indicator in the message stream view would be in the wrong direction. + ([#5921](https://github.com/mitmproxy/mitmproxy/issues/5921), @konradh) * Fix a bug where peername would be None in tls_passthrough script, which would make it not working. ([#5904](https://github.com/mitmproxy/mitmproxy/pull/5904), @truebit) diff --git a/mitmproxy/tools/console/flowview.py b/mitmproxy/tools/console/flowview.py index f00d2fefe..9f2298728 100644 --- a/mitmproxy/tools/console/flowview.py +++ b/mitmproxy/tools/console/flowview.py @@ -255,21 +255,17 @@ class FlowDetails(tabs.Tabs): viewmode = self.master.commands.call("console.flowview.mode") widget_lines = [] - - from_client = flow.messages[0].from_client for m in flow.messages: _, lines, _ = contentviews.get_message_content_view(viewmode, m, flow) for line in lines: - if from_client: + if m.from_client: line.insert(0, self.FROM_CLIENT_MARKER) else: line.insert(0, self.TO_CLIENT_MARKER) widget_lines.append(urwid.Text(line)) - from_client = not from_client - if flow.intercepted: markup = widget_lines[-1].get_text()[0] widget_lines[-1].set_text(("intercept", markup))