aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-07-21 19:49:32 -0700
committerMaximilian Hils <git@maximilianhils.com>2016-07-21 19:49:32 -0700
commit798759d2b3974eaa7afbaab7c9678e8f66dc1be6 (patch)
tree05612244e60bb091f95812a857652ae2fe8f87fd /netlib
parentdaae51823de79ca728e32d7925e239231c85e442 (diff)
downloadmitmproxy-798759d2b3974eaa7afbaab7c9678e8f66dc1be6.tar.gz
mitmproxy-798759d2b3974eaa7afbaab7c9678e8f66dc1be6.tar.bz2
mitmproxy-798759d2b3974eaa7afbaab7c9678e8f66dc1be6.zip
fix content view cache invalidation
Diffstat (limited to 'netlib')
-rw-r--r--netlib/http/message.py6
-rw-r--r--netlib/multidict.py6
2 files changed, 3 insertions, 9 deletions
diff --git a/netlib/http/message.py b/netlib/http/message.py
index 34709f0a..a86e7489 100644
--- a/netlib/http/message.py
+++ b/netlib/http/message.py
@@ -32,9 +32,6 @@ class MessageData(basetypes.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":
@@ -77,9 +74,6 @@ class Message(basetypes.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()
diff --git a/netlib/multidict.py b/netlib/multidict.py
index 51053ff6..e9fec155 100644
--- a/netlib/multidict.py
+++ b/netlib/multidict.py
@@ -79,9 +79,6 @@ class _MultiDict(MutableMapping, basetypes.Serializable):
def __ne__(self, other):
return not self.__eq__(other)
- def __hash__(self):
- return hash(self.fields)
-
def get_all(self, key):
"""
Return the list of all values for a given key.
@@ -241,6 +238,9 @@ class ImmutableMultiDict(MultiDict):
__delitem__ = set_all = insert = _immutable
+ def __hash__(self):
+ return hash(self.fields)
+
def with_delitem(self, key):
"""
Returns: