diff options
| author | cce <devnull@localhost> | 2007-03-27 22:29:26 +0000 |
|---|---|---|
| committer | cce <devnull@localhost> | 2007-03-27 22:29:26 +0000 |
| commit | 375da7bab7ef7a32026784f65f771865547d3ace (patch) | |
| tree | 14a19cb4157843b8ec8b27b816cfc6a00b9f2827 | |
| parent | b31fbe9670ebb79abcf2c4717778e80ce93bc4f7 (diff) | |
| download | paste-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
| -rw-r--r-- | paste/gzipper.py | 4 |
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 |
