adjusting gzip logic

This commit is contained in:
Chris Lu
2012-10-23 10:59:40 -07:00
parent 6f7b0cafee
commit 9630825576
3 changed files with 5 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ func GetHandler(w http.ResponseWriter, r *http.Request) {
if ext != "" {
mtype := mime.TypeByExtension(ext)
w.Header().Set("Content-Type", mtype)
if storage.IsCompressable(ext, mtype) {
if storage.IsGzippable(ext, mtype) {
if strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
w.Header().Set("Content-Encoding", "gzip")
} else {