feat: optimize mime type

This commit is contained in:
tilo committed 2026-02-15 18:49:22 +01:00
1 parent f85afce949
commit df0bf9bed7
6 files changed
+103 -2

No files matched your search

+1 -2
View File
@@ -7,7 +7,6 @@ import (
"io"
"io/fs"
"log/slog"
"mime"
"net"
"os"
"path"
@@ -74,7 +73,7 @@ func sendFile(file *os.File, conn net.Conn) {
parts := strings.Split(fileStat.Name(), ".")
ext := "." + parts[len(parts)-1]
mime_type := mime.TypeByExtension(ext)
mime_type := rh.ExtensionToMimetype[ext]
length := fileStat.Size()
if mime_type == "" {