extras/try_gzip_static.rb in yahns-1.17.0 vs extras/try_gzip_static.rb in yahns-1.18.0

- old
+ new

@@ -77,10 +77,13 @@ "Content-Length" => len.to_s, "Last-Modified" => st.mtime.httpdate, "Accept-Ranges" => "bytes", } h["Cache-Control"] = "no-transform" unless mime =~ %r{\Atext\/} - h["Content-Encoding"] = "gzip" if gz_st + if gz_st + h["Content-Encoding"] = "gzip" + h["Vary"] = "Accept-Encoding" + end h end def head_no_gz(res, env, path, st) res[1] = fheader(env, path, st)