SimplePie: Added unconventional mime type for RSS

Since `application/rss+xml` is not official
http://www.iana.org/assignments/media-types/media-types.xhtml, then it
is fair enough to use the `x-` prefix.
https://github.com/FreshRSS/FreshRSS/issues/706
This commit is contained in:
Alexandre Alapetite
2014-11-12 22:42:47 +01:00
parent 56ac35095a
commit e4ea629f59

View File

@@ -148,7 +148,7 @@ class SimplePie_Locator
{
$sniffer = $this->registry->create('Content_Type_Sniffer', array($file));
$sniffed = $sniffer->get_type();
if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml')))
if (in_array($sniffed, array('application/rss+xml', 'application/rdf+xml', 'text/rdf', 'application/atom+xml', 'text/xml', 'application/xml', 'application/x-rss+xml'))) //FreshRSS
{
return true;
}