add svg output support, but only with primitive

This commit is contained in:
Will Norris 2019-10-13 09:06:27 -07:00
parent b951a9ccc3
commit a1e81bb21f
3 changed files with 17 additions and 2 deletions

View file

@ -263,6 +263,9 @@ func peekContentType(p *bufio.Reader) string {
if err != nil && err != bufio.ErrBufferFull && err != io.EOF {
return ""
}
if bytes.HasPrefix(byt, []byte("<svg")) {
return "image/svg+xml"
}
return http.DetectContentType(byt)
}