summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wsgitools/filters.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/wsgitools/filters.py b/wsgitools/filters.py
index b0bf8e1..5821c00 100644
--- a/wsgitools/filters.py
+++ b/wsgitools/filters.py
@@ -360,6 +360,16 @@ class GzipWSGIFilter(BaseWSGIFilter):
self.sio = StringIO.StringIO()
self.gzip = gzip.GzipFile(fileobj=self.sio, mode="w")
return environ
+ def filter_header(self, headername, headervalue):
+ """ BaseWSGIFilter interface
+ @type headername: str
+ @type headervalue: str
+ @rtype: (str, str) or None
+ """
+ if self.compress:
+ if headername.lower() == "content-length":
+ return None
+ return (headername, headervalue)
def filter_headers(self, headers):
"""BaseWSGIFilter interface
@type headers: [(str, str)]