summaryrefslogtreecommitdiffstats
path: root/module/web/middlewares.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-13 18:48:01 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-13 18:48:01 +0100
commitb0ab80452769af1482e679db93abd407c608a7f6 (patch)
tree64ea3210a847b810e575cc28649b2f519671e002 /module/web/middlewares.py
parentfixed login issue (diff)
downloadpyload-b0ab80452769af1482e679db93abd407c608a7f6.tar.xz
cnl fix
Diffstat (limited to 'module/web/middlewares.py')
-rw-r--r--module/web/middlewares.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/web/middlewares.py b/module/web/middlewares.py
index 745d7e6b5..f8b2ed976 100644
--- a/module/web/middlewares.py
+++ b/module/web/middlewares.py
@@ -85,9 +85,10 @@ class GzipResponse(object):
self.headers = headers
ct = header_value(headers,'content-type')
ce = header_value(headers,'content-encoding')
+ cl = int(header_value(headers, 'content-length'))
self.compressible = False
if ct and (ct.startswith('text/') or ct.startswith('application/')) \
- and 'zip' not in ct:
+ and 'zip' not in ct and cl > 200:
self.compressible = True
if ce:
self.compressible = False