mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 04:52:35 +02:00
fix svg content type
This commit is contained in:
parent
4e7bd3579b
commit
5faba1b5a9
1 changed files with 1 additions and 1 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Reference in a new issue