summaryrefslogtreecommitdiff
path: root/paste/gzipper.py
diff options
context:
space:
mode:
authorcce <devnull@localhost>2007-03-27 22:29:26 +0000
committercce <devnull@localhost>2007-03-27 22:29:26 +0000
commit375da7bab7ef7a32026784f65f771865547d3ace (patch)
tree14a19cb4157843b8ec8b27b816cfc6a00b9f2827 /paste/gzipper.py
parentb31fbe9670ebb79abcf2c4717778e80ce93bc4f7 (diff)
downloadpaste-375da7bab7ef7a32026784f65f771865547d3ace.tar.gz
for gzipper, (a) don't test content type if it is blank and
(b) be a bit more explicit about the heuristic
Diffstat (limited to 'paste/gzipper.py')
-rw-r--r--paste/gzipper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/paste/gzipper.py b/paste/gzipper.py
index 5942cc2..3ce14a4 100644
--- a/paste/gzipper.py
+++ b/paste/gzipper.py
@@ -55,8 +55,8 @@ class GzipResponse(object):
ct = header_value(headers,'content-type')
ce = header_value(headers,'content-encoding')
self.compressible = False
- if (ct.startswith('text') or ct.startswith('application')) \
- and not 'z' in ct:
+ if ct and (ct.startswith('text/') or ct.startswith('application/')) \
+ and 'zip' not in ct:
self.compressible = True
if ce:
self.compressible = False