mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-26 06:50:45 +01:00
Better guessing mime type with octstream
This commit is contained in:
1 parent
d2f3cab8e1
commit
d7f6af09e6
1 file changed
+4
-1
@@ -102,7 +102,10 @@ func (vs *VolumeServer) GetOrHeadHandler(w http.ResponseWriter, r *http.Request)
|
||||
mtype = mime.TypeByExtension(ext)
|
||||
}
|
||||
if n.MimeSize > 0 {
|
||||
mtype = string(n.Mime)
|
||||
mt := string(n.Mime)
|
||||
if mt != "application/octet-stream" {
|
||||
mtype = mt
|
||||
}
|
||||
}
|
||||
if mtype != "" {
|
||||
w.Header().Set("Content-Type", mtype)
|
||||
|
||||
Reference in new issue
Block a user