This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5489 - Incorrect Mimetype warning
Summary: Incorrect Mimetype warning
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: 0.8.2
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2008-02-19 00:09 UTC by Leon Pennington
Modified: 2008-02-19 00:50 UTC (History)
0 users

See Also:


Description Leon Pennington 2008-02-19 00:09:52 UTC
My page at is xhtml 1.1, but I'm getting a warning about a mimetype conflict. Its reporting text/html when it should be application/html+xml.

The only problem is my page is setting this dynamically in PHP and is checking the user agent acceptance header (HTTP_ACCEPT) to see if the user agent will accept a application/html+xml page.

This validator does not accept that mimetype so my page won't send it. If I ignore the check and send it anyway it validates, but this breaks some browsers (you can guess which ).

So application/html+xml needs adding to the accepted types.
Comment 1 Olivier Thereaux 2008-02-19 00:50:01 UTC
This has been discussed many times on the www-validator mailing-list and here on the bugzilla, so I will just summarize:

* If you want to server XHTML as text/html to legacy user agents, you should be using XHTML 1.0, which has HTML compatibility guidelines precisely for that.

* If for some reason you really want to use XHTML 1.1, then make your php script send application/xhtml+xml as a *default*, not the other way around. It will still be against the specifications, but less often.

* If for some reason you really really want to serve XHTML 1.1 as text/html by default, live with the fact that the validator tells you off for it. It's just a warning. And if you can't stand it, there's always