From e4c7ec5aa9c9e0c137b5314dbac188b70978c7a0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 15 Nov 2013 07:43:49 +0000 Subject: extras/try_gzip_static: account for Rack::Deflater use Clients may be requesting gzipped files through Rack::Deflater, which will attempt to further compress files. --- extras/try_gzip_static.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras') diff --git a/extras/try_gzip_static.rb b/extras/try_gzip_static.rb index e3010f1..57b899f 100644 --- a/extras/try_gzip_static.rb +++ b/extras/try_gzip_static.rb @@ -12,9 +12,9 @@ class TryGzipStatic # attr_writer :sf_range # only used if the server does not handle #to_path, - # yahns should never hit this + # we actually hit this if serving the gzipped file in the first place, + # _and_ Rack::Deflater is used in the middleware stack. Oh well... def each - raise "we should never get here in yahns" buf = "" rsize = 8192 if @sf_range -- cgit v1.2.3-24-ge0c7