diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:03:44 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:03:44 +1300 |
commit | d9c6be3d131fa01f70779307b688560f1ace0751 (patch) | |
tree | c74d24f7b96288a957bfceb27381af9e2f3e92dc /libmproxy | |
parent | 5da27a9905302a5e43fdf4db8a7b7b784544bed2 (diff) | |
download | mitmproxy-d9c6be3d131fa01f70779307b688560f1ace0751.tar.gz mitmproxy-d9c6be3d131fa01f70779307b688560f1ace0751.tar.bz2 mitmproxy-d9c6be3d131fa01f70779307b688560f1ace0751.zip |
Fix serialization when a Request has no associated client connection.
Diffstat (limited to 'libmproxy')
-rw-r--r-- | libmproxy/proxy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 1c4d4d71..88c62b25 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -150,7 +150,7 @@ class Request(controller.Msg): def get_state(self): return dict( - client_conn = self.client_conn.get_state(), + client_conn = self.client_conn.get_state() if self.client_conn else None, host = self.host, port = self.port, scheme = self.scheme, @@ -164,7 +164,7 @@ class Request(controller.Msg): @classmethod def from_state(klass, state): return klass( - ClientConnect.from_state(state["client_conn"]), + ClientConnect.from_state(state["client_conn"]) if state["client_conn"] else None, state["host"], state["port"], state["scheme"], |