Skip to content

Commit

Permalink
fix: set default mimetype to empty string (close #1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Sep 19, 2022
1 parent d8dc8d8 commit ca177cc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions server/webdav/prop.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,11 @@ func findContentType(ctx context.Context, ls LockSystem, name string, fi model.O
//defer f.Close()
// This implementation is based on serveContent's code in the standard net/http package.
ctype := mime.TypeByExtension(path.Ext(name))
if ctype != "" {
return ctype, nil
}
return "application/octet-stream", nil
return ctype, nil
//if ctype != "" {
// return ctype, nil
//}
//return "application/octet-stream", nil
// Read a chunk to decide between utf-8 text and binary.
//var buf [512]byte
//n, err := io.ReadFull(f, buf[:])
Expand Down

0 comments on commit ca177cc

Please sign in to comment.