- From: olivier Thereaux <ot@w3.org>
- Date: Tue, 31 Jul 2007 15:03:35 +0900
- To: "Andries Louw Wolthuizen" <info@andrieslouw.nl>
- Cc: www-validator Community <www-validator@w3.org>, gez@juicystudio.com
Hi Andries, On Jul 31, 2007, at 14:07 , Andries Louw Wolthuizen wrote: > Your validator (http://validator.w3.org/check) It's your validator too, if you use it. > doesn't send the HTTP_ACCEPT header with a request Indeed, and it doesn't have to. Some have argued it would be better if it did. Nobody ever sent a reasonable patch to that effect. > , so I (or my server) can't send a Content-Type: application/xhtml > +xml header. Your server is broken. > p.s. My website does send a correct header to browsers (such as > firefox) that send a HTTP_ACCEPT header, so the problem isn't on my > side. No. Not all user agents will be sending HTTP_ACCEPT headers, and they will be perfectly right, per the HTTP standard. On the other hand, XHTML 1.1 shouldn't be served as text/html. Are you sure the problem isn't on your side? > Try it for yourself, setup a page with: > http://juicystudio.com/article/content-negotiation.php#php Trying to work around browser bugs is very understandable, but an improvement to this technique would be to use application/xhtml+xml as the *default*, as it should be for XHTML 1.1. Not the other way around. Hence: * if accept headers present, and application/xhtml+xml not accepted, send text/html * else, send application/xhtml+xml I think this would be a much more sane behavior. Gez? What do you think? > Please correct this error in your validator, and let your validator > send a HTTP_ACCEPT header. Please send a patch for the validator (It's open source, the source can be retrieved e.g from http://dev.w3.org/cvsweb/validator/ ), and/ or complain to the vendor(s) of browsers not respecting the specs. I'd personally suggest the latter - covering up bad behavior with layers of hacks over hacks is a bad idea... -- olivier
Received on Tuesday, 31 July 2007 06:03:06 UTC