aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-12-27 12:17:05 -0800
committerChris Lu <chris.lu@gmail.com>2018-12-27 12:17:05 -0800
commitd3660ffce8ec38f8017216bca2e77c0362328c72 (patch)
tree6d2928b7d5a7d86557910f873023037e0280074e
parent069c641d7c0c934c0f3a14840117b351907d7d0e (diff)
downloadseaweedfs-d3660ffce8ec38f8017216bca2e77c0362328c72.tar.xz
seaweedfs-d3660ffce8ec38f8017216bca2e77c0362328c72.zip
avoid gzipping files without file extensions
fix https://github.com/chrislusf/seaweedfs/issues/804
-rw-r--r--weed/operation/compress.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/operation/compress.go b/weed/operation/compress.go
index 50958fd50..65979d529 100644
--- a/weed/operation/compress.go
+++ b/weed/operation/compress.go
@@ -38,8 +38,8 @@ func IsGzippable(ext, mtype string, data []byte) bool {
return true
case ".php", ".java", ".go", ".rb", ".c", ".cpp", ".h", ".hpp":
return true
- case ".png", ".jpg", ".jpeg", "":
- return true
+ case ".png", ".jpg", ".jpeg":
+ return false
}
// by mime type