For some reason, on my system XHTML file are assigned the application/x-extension-xhtml MIME type. Since it's not on the list of supported MIME types, it seems that WebKit should grow support for this MIME type or translate it to a more typical XHTML mime type. I'm still investigating what Linux package is causing this setting.
This doesn't look like a correct XHTML MIME type to me, see <http://www.w3.org/TR/xhtml-media-types/>. A workaround in platform specific loader code seems OK if limited to local files, but I don't think that simply extending the set of XHTML types would be.
Sounds reasonable to me. I'm still not sure what package forced the bogus MIME type, but depending on how common it is, we can either do a work-around in the soup backend or inform whatever project that they are polluting the MIME type tools.
This bug report is confusing. The correct mime for example.xhtml is application/xhtml+xml. The title of this bug suggests that XHTML files should be served as application/x-extension-xhtml. While the first post conflicts with that. I just filed a bug report with an XHTML test case which Safari is clearly using the HTML parser (uppercase nodeName, e.g. DIV) instead of the XML parser (lowercase nodeName, e.g. div): https://bugs.webkit.org/show_bug.cgi?id=226148
I haven't seen this bug again in 8 years, so I'm going to close this. :)