summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-13 18:56:02 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-03-13 18:56:02 +0100
commitb2ac275cba8b9f46864ad07f50a1db485bcb6f43 (patch)
treeb6994d3aced0a0ebe808225baf2e9cbae0fcf50e /module/web
parentcnl fix (diff)
downloadpyload-b2ac275cba8b9f46864ad07f50a1db485bcb6f43.tar.xz
fixed gzip
Diffstat (limited to 'module/web')
-rw-r--r--module/web/middlewares.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/web/middlewares.py b/module/web/middlewares.py
index f8b2ed976..b71138e69 100644
--- a/module/web/middlewares.py
+++ b/module/web/middlewares.py
@@ -85,7 +85,11 @@ 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'))
+ cl = header_value(headers, 'content-length')
+ if cl:
+ cl = int(cl)
+ else:
+ cl = 201
self.compressible = False
if ct and (ct.startswith('text/') or ct.startswith('application/')) \
and 'zip' not in ct and cl > 200: