Also fetch application/xml is rss/atom feed

This commit is contained in:
Peter Stuifzand 2018-05-22 21:12:00 +02:00
parent 799bd08253
commit fe8a7b675f

View File

@ -279,7 +279,7 @@ func (b *memoryBackend) feedItems(fetchURL, contentType string, body io.Reader)
item.Photo = []string{feedItem.Image}
items = append(items, item)
}
} else if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/rss+xml") || strings.HasPrefix(contentType, "application/atom+xml") {
} else if strings.HasPrefix(contentType, "text/xml") || strings.HasPrefix(contentType, "application/rss+xml") || strings.HasPrefix(contentType, "application/atom+xml") || strings.HasPrefix(contentType, "application/xml") {
body, err := ioutil.ReadAll(body)
if err != nil {
log.Printf("Error while parsing rss/atom feed: %s\n", err)