From ca177cc3b97c685bb8a0ed85df3f31f9f4eaced0 Mon Sep 17 00:00:00 2001
From: Noah Hsu <i@nn.ci>
Date: Mon, 19 Sep 2022 18:58:40 +0800
Subject: [PATCH] fix: set default mimetype to empty string (close #1710)

---
 server/webdav/prop.go | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/server/webdav/prop.go b/server/webdav/prop.go
index fa59b9a507e..73f92a2f2da 100644
--- a/server/webdav/prop.go
+++ b/server/webdav/prop.go
@@ -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[:])