diff --git a/.gitignore b/.gitignore index 52a9c61..08a568c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ go-jamming vangen *.sublime-workspace -.idea/* \ No newline at end of file +.idea/* +__debug* \ No newline at end of file diff --git a/app/webmention/send/discoverer.go b/app/webmention/send/discoverer.go index 13d9e7b..94587fd 100644 --- a/app/webmention/send/discoverer.go +++ b/app/webmention/send/discoverer.go @@ -26,24 +26,10 @@ var ( "feed", "feed/index.xml", } - - possibleContentTypes = []string{ - "application/rss+xml", - "application/atom+xml", - "application/xml", - "text/xml", - "application/rdf+xml", - } ) func isContentTypeFeedCompatible(header http.Header) bool { - cType := header.Get("Content-Type") - for _, possibleType := range possibleContentTypes { - if strings.Contains(cType, possibleType) { - return true - } - } - return false + return strings.Contains(header.Get("Content-Type"), "xml") } func (sndr *Sender) discoverRssFeed(domain string) (string, error) {