diff --git a/CHANGELOG.md b/CHANGELOG.md index cee75fc2d..435dcf9f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * Upstream replays don't do CONNECT on plaintext HTTP requests (#4876, @HoffmannP) * Remove workarounds for old pyOpenSSL versions (#4831, @KarlParkinson) * Add fonts to asset filter (~a) (#4928, @elespike) +* Fix bug that crashed when using `view.flows.resolve` (#4916, @rbdixon) ## 28 September 2021: mitmproxy 7.0.4 diff --git a/mitmproxy/controller.py b/mitmproxy/controller.py index 56365362f..f6b2a22bb 100644 --- a/mitmproxy/controller.py +++ b/mitmproxy/controller.py @@ -65,6 +65,10 @@ class Reply: # This will be ignored by the interpreter, but emit a warning raise exceptions.ControlException(f"Uncommitted reply: {self.obj}") + def __deepcopy__(self, memo): + # some parts of the console ui may use deepcopy, see https://github.com/mitmproxy/mitmproxy/issues/4916 + return memo.setdefault(id(self), DummyReply()) + class DummyReply(Reply): """