forked from tangled.org/core
this repo has no description

knotserver: simplify svg exception for now

Let's stick to just the file extension alone since we sometimes seem to get
text/plain as the MIME type.

anirudh.fi 5dea443e 1fdea40b

verified
Changed files
+1 -1
knotserver
+1 -1
knotserver/routes.go
···
mimeType := http.DetectContentType(contents)
// exception for svg
-
if strings.HasPrefix(mimeType, "text/xml") && filepath.Ext(treePath) == ".svg" {
+
if filepath.Ext(treePath) == ".svg" {
mimeType = "image/svg+xml"
}