aboutsummaryrefslogtreecommitdiffstats
path: root/libmproxy/proxy.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmproxy/proxy.py')
-rw-r--r--libmproxy/proxy.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py
index 690df9f4..fe545335 100644
--- a/libmproxy/proxy.py
+++ b/libmproxy/proxy.py
@@ -154,6 +154,13 @@ class Request(controller.Msg):
for i in delheaders:
del self.headers[i]
+ def anticomp(self):
+ """
+ Modifies this request to remove headers that might produce a cached
+ response. That is, we remove ETags and If-Modified-Since headers.
+ """
+ self.headers["accept-encoding"] = ["identity"]
+
def set_replay(self):
self.client_conn = None
@@ -244,7 +251,6 @@ class Request(controller.Msg):
modifications to make sure interception works properly.
"""
headers = self.headers.copy()
- utils.try_del(headers, 'accept-encoding')
utils.try_del(headers, 'proxy-connection')
utils.try_del(headers, 'keep-alive')
utils.try_del(headers, 'connection')