aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-05-20 20:02:56 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-05-20 20:02:56 -0700
commitdcad3f72af52b51a14934ad767005bf36b46403d (patch)
tree71b063a741e2d41782777c918976b02b8f0da679 /netlib/http
parent97f3077082371a078380ec28e1425de3dc2a0021 (diff)
parenteb914924ab56b28f982660c0600f6ae8818af204 (diff)
downloadmitmproxy-dcad3f72af52b51a14934ad767005bf36b46403d.tar.gz
mitmproxy-dcad3f72af52b51a14934ad767005bf36b46403d.tar.bz2
mitmproxy-dcad3f72af52b51a14934ad767005bf36b46403d.zip
Merge branch 'issue-1099'
Diffstat (limited to 'netlib/http')
-rw-r--r--netlib/http/message.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/netlib/http/message.py b/netlib/http/message.py
index 9b0180cf..028f43a1 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()