mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 03:35:01 +08:00
Better guessing mime type with octstream
This commit is contained in:
@@ -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