fix svg content type

This commit is contained in:
yusing 2025-01-21 10:07:53 +08:00
parent 4e7bd3579b
commit 5faba1b5a9

View file

@ -69,7 +69,7 @@ func (res *fetchResult) OK() bool {
func (res *fetchResult) ContentType() string {
if res.contentType == "" {
if bytes.HasPrefix(res.icon, []byte("<svg")) {
if bytes.HasPrefix(res.icon, []byte("<svg")) || bytes.HasPrefix(res.icon, []byte("<?xml")) {
return "image/svg+xml"
} else {
return "image/x-icon"