diff options
Diffstat (limited to 'lib/rack/static.rb')
-rw-r--r-- | lib/rack/static.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/static.rb b/lib/rack/static.rb index 24c40505..7332914a 100644 --- a/lib/rack/static.rb +++ b/lib/rack/static.rb @@ -125,7 +125,7 @@ module Rack if can_serve(path) if overwrite_file_path(path) env[PATH_INFO] = (add_index_root?(path) ? path + @index : @urls[path]) - elsif @gzip && /\bgzip\b/.match?(env['HTTP_ACCEPT_ENCODING']) + elsif @gzip && env['HTTP_ACCEPT_ENCODING'] && /\bgzip\b/.match?(env['HTTP_ACCEPT_ENCODING']) path = env[PATH_INFO] env[PATH_INFO] += '.gz' response = @file_server.call(env) |