diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-11-15 07:55:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2013-11-15 07:57:37 +0000 |
commit | 521a703c390a1decbfd4b7ede049880a9afe146c (patch) | |
tree | a2ff07525a3c4986490397e63106d9ac94e9b1da /extras | |
parent | e4c7ec5aa9c9e0c137b5314dbac188b70978c7a0 (diff) | |
download | yahns-521a703c390a1decbfd4b7ede049880a9afe146c.tar.gz |
This allows yahns to continue using sendfile when clients request gzipped/bzipped tarballs on my server.
Diffstat (limited to 'extras')
-rw-r--r-- | extras/try_gzip_static.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extras/try_gzip_static.rb b/extras/try_gzip_static.rb index 57b899f..b8abb03 100644 --- a/extras/try_gzip_static.rb +++ b/extras/try_gzip_static.rb @@ -77,6 +77,7 @@ class TryGzipStatic "Last-Modified" => st.mtime.httpdate, "Accept-Ranges" => "bytes", } + h["Cache-Control"] = "no-transform" unless mime =~ %r{\Atext\/} h["Content-Encoding"] = "gzip" if gz_st h end |