Skip to content

Podcast parsing broken b/c of too strict MIME type check

I have discovered the following on Windows 10 using this VLC 3.0.0 nightly. The nature of the issue suggests that other platforms and versions are equally affected.

On May 22 2017, a change has been made to the podcast parsing code (Github changeset, specifically podcast.c line 53) that effectively fixes the expected MIME type for podcasts to "application/rss+xml".

In the real world, this assumption is not always true. For example, this podcast is valid in every respect but is served as "text/xml".

The effect is that podcasts that could be parsed without any problem (I know because it worked with the same podcast URL on an older version of 3.0.0 until I installed the latest one today) are rejected with an unhelpful error message because of a minor deviation in the response headers. (''"Your input can't be opened: VLC is unable to open the MRL 'http://podcast/url'. Check the log for details."'')

I suggest adding other XML types ("application/xml" and "text/xml") to the whitelist, or even just checking for the substring "xml" instead of the full MIME type. If the response is not a proper XML/RSS file, the parsing will fail a few lines later anyway, and with a much more helpful message, too.

Relevant potion of the debug log for reference is attached.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information