diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-05-20 13:59:42 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-05-20 13:59:42 -0700 |
commit | eb914924ab56b28f982660c0600f6ae8818af204 (patch) | |
tree | 1913607645abcc7fd0c1fe10533bdf9ac2dfd020 /netlib/http/message.py | |
parent | b538138ead1dc8550f2d4e4a3f30ff70abb95f53 (diff) | |
download | mitmproxy-eb914924ab56b28f982660c0600f6ae8818af204.tar.gz mitmproxy-eb914924ab56b28f982660c0600f6ae8818af204.tar.bz2 mitmproxy-eb914924ab56b28f982660c0600f6ae8818af204.zip |
fix #1099
Diffstat (limited to 'netlib/http/message.py')
-rw-r--r-- | netlib/http/message.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/netlib/http/message.py b/netlib/http/message.py index db4054b1..76affeec 100644 --- a/netlib/http/message.py +++ b/netlib/http/message.py @@ -26,6 +26,9 @@ class MessageData(utils.Serializable): def __ne__(self, other): return not self.__eq__(other) + def __hash__(self): + return hash(frozenset(self.__dict__.items())) + def set_state(self, state): for k, v in state.items(): if k == "headers": @@ -52,6 +55,9 @@ class Message(utils.Serializable): def __ne__(self, other): return not self.__eq__(other) + def __hash__(self): + return hash(self.data) ^ 1 + def get_state(self): return self.data.get_state() |