niphlod is right, no need to to restrict gzip streaming to rocket

This commit is contained in:
mdipierro
2012-09-16 15:54:20 -05:00
parent c9a7b2394d
commit 74284193dc
2 changed files with 2 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.0.9 (2012-09-16 15:51:47) stable
Version 2.0.9 (2012-09-16 15:54:17) stable
+1 -3
View File
@@ -13,7 +13,6 @@ import time
import re
import errno
import rewrite
from rocket import SERVER_SOFTWARE
from http import HTTP
from contenttype import contenttype
@@ -92,8 +91,7 @@ def stream_file_or_304_or_206(
headers['Content-Length'] = '%i' % bytes
status = 206
else:
if request.env.server == SERVER_SOFTWARE and \
'gzip' in request.env.http_accept_encoding and\
if 'gzip' in request.env.http_accept_encoding and\
not 'Content-Encoding' in headers:
gzipped = static_file + '.gz'
if os.path.isfile(gzipped) and os.path.getmtime(gzipped)>modified: