diff --git a/mitmproxy/stateobject.py b/mitmproxy/stateobject.py index 4074fbbf9..5e4ae6e3d 100644 --- a/mitmproxy/stateobject.py +++ b/mitmproxy/stateobject.py @@ -53,7 +53,7 @@ class StateObject(netlib.basetypes.Serializable): state = state.copy() for attr, cls in six.iteritems(self._stateobject_attributes): val = state.pop(attr) - if state.get(attr) is None: + if val is None: setattr(self, attr, val) else: curr = getattr(self, attr)