From bacff3453baff950bc60318fb515687e9b89ccde Mon Sep 17 00:00:00 2001 From: Massimo Date: Tue, 2 Oct 2012 14:55:56 -0500 Subject: [PATCH] fised issue 1063 --- VERSION | 2 +- gluon/streamer.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 90a3f2e3..c364805d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.9 (2012-10-02 14:50:06) dev +Version 2.0.9 (2012-10-02 14:55:51) dev diff --git a/gluon/streamer.py b/gluon/streamer.py index 5ab2b8c8..c5b5142b 100644 --- a/gluon/streamer.py +++ b/gluon/streamer.py @@ -95,8 +95,8 @@ def stream_file_or_304_or_206( status = 206 # in all the other cases (not 304, not 206, but 200 or error page) if status != 206: - if 'gzip' in request.env.http_accept_encoding and\ - not 'Content-Encoding' in headers: + enc = request.env.http_accept_encoding + if enc and 'gzip' in enc and not 'Content-Encoding' in headers: gzipped = static_file + '.gz' if os.path.isfile(gzipped) and os.path.getmtime(gzipped)>modified: static_file = gzipped