aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/message.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/http/message.py')
-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 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()