niphlod is right, no need to to restrict gzip streaming to rocket
This commit is contained in:
@@ -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
@@ -13,7 +13,6 @@ import time
|
|||||||
import re
|
import re
|
||||||
import errno
|
import errno
|
||||||
import rewrite
|
import rewrite
|
||||||
from rocket import SERVER_SOFTWARE
|
|
||||||
from http import HTTP
|
from http import HTTP
|
||||||
from contenttype import contenttype
|
from contenttype import contenttype
|
||||||
|
|
||||||
@@ -92,8 +91,7 @@ def stream_file_or_304_or_206(
|
|||||||
headers['Content-Length'] = '%i' % bytes
|
headers['Content-Length'] = '%i' % bytes
|
||||||
status = 206
|
status = 206
|
||||||
else:
|
else:
|
||||||
if request.env.server == SERVER_SOFTWARE and \
|
if 'gzip' in request.env.http_accept_encoding and\
|
||||||
'gzip' in request.env.http_accept_encoding and\
|
|
||||||
not 'Content-Encoding' in headers:
|
not 'Content-Encoding' in headers:
|
||||||
gzipped = static_file + '.gz'
|
gzipped = static_file + '.gz'
|
||||||
if os.path.isfile(gzipped) and os.path.getmtime(gzipped)>modified:
|
if os.path.isfile(gzipped) and os.path.getmtime(gzipped)>modified:
|
||||||
|
|||||||
Reference in New Issue
Block a user