diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2012-02-18 12:25:22 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2012-02-18 12:25:22 +1300 |
commit | 14def89f5038cdcad643bc0f9e9353c408b94626 (patch) | |
tree | 37d7caf58e74f43e3df5e5deaab0b97a634c0863 /libmproxy | |
parent | 4ed8031172235188fdd737e7b0d399a482c261f4 (diff) | |
download | mitmproxy-14def89f5038cdcad643bc0f9e9353c408b94626.tar.gz mitmproxy-14def89f5038cdcad643bc0f9e9353c408b94626.tar.bz2 mitmproxy-14def89f5038cdcad643bc0f9e9353c408b94626.zip |
Fix a problem in deserialization of flows with errors.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/console/common.py | 1 | ||||
-rw-r--r-- | libmproxy/flow.py | 6 |
2 files changed, 3 insertions, 4 deletions
diff --git a/libmproxy/console/common.py b/libmproxy/console/common.py index 165b9497..34f3ae4a 100644 --- a/libmproxy/console/common.py +++ b/libmproxy/console/common.py @@ -145,7 +145,6 @@ def format_flow(f, focus, extended=False, padding=2): resp.append(fcol(utils.pretty_size(len(f.response.content)), rc)) else: resp.append(fcol("[empty content]", rc)) - elif f.error: resp.append( urwid.Text([ diff --git a/libmproxy/flow.py b/libmproxy/flow.py index 2b371180..776846fe 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -660,9 +660,9 @@ class Error(controller.Msg): ) @classmethod - def _from_state(klass, state): + def _from_state(klass, request, state): return klass( - None, + request, state["msg"], state["timestamp"], ) @@ -896,7 +896,7 @@ class Flow: if self.error: self.error._load_state(state["error"]) else: - self.error = Error._from_state(state["error"]) + self.error = Error._from_state(self.request, state["error"]) else: self.error = None |