Re: Validator doesn't send HTTP_ACCEPT headers, "Conflict between Mime Type and Document Type" warning is incorrect.

Olivier,
Andries,

Am 31.07.2007 um 08:03 schrieb olivier Thereaux:

>> 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.

What's about the patch on http://www.w3.org/Bugs/Public/show_bug.cgi? 
id=18 ?

> 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 would be lucky, if I would have such rules for Apache's httpd.conf  
to satisfy that. Because it seems to be very difficult to check that  
way (application/xhtml+xml *not* accepted), most widely spread way to  
check this, is the other way round: to check, if application/xhtml 
+xml *is* accepted.
And the latter only does works, because modern web browsers *do* send  
an Accept-Header and *do* signalize "Yes, I accept application/xhtml 
+xml". If the web client signalizes, "I accept all (and nothing)"  
with having a "* (star)" in its Accept header, like Internet Explorer  
does, you have *no* possibility to check anything against. That's why  
from my point of view it is so helpfully to put some meaningful  
information into the Accept-Header of the client.
Please proove your argues, Olivier, by providing a working and  
relieable piece of code (e.g. for Apache's httpd.conf), that checks  
the *absence* of application/xhtml+xml in the Accept header.
This all is a mess because of the Internet Explorer, who can't deal  
with "application/xhtml+xml", because it doesn't know of it and  
doesn't have a relieably Accept header either. IE accepts "* (star)"
As I said earlier: please, please splash out a reliable Accept header  
to the validator, as any modern web browser (except IE) also does!  
Please! Please don't follow the Internet Explorer in that manner!
Because Internet Explorer accepts "anything" (and none, concerning  
XHTML), you should *not* send application/xhtml+xml as the *default*  
-- how would you distinguish for Internet Explorer to send "text/ 
html" only in that case?

> I think this would be a much more sane behavior. Gez? What do you  
> think?

Olivier, this is a far old discussion. Andries, see http:// 
lists.w3.org/Archives/Public/www-validator/2007Apr/ and

validator does not supply reasonable Accept header by default
http://www.w3.org/Bugs/Public/show_bug.cgi?id=785

For conneg, allow choosing the Accept-* headers to send.
http://www.w3.org/Bugs/Public/show_bug.cgi?id=18

See also the following Bug comments on that issue:

http://www.w3.org/Bugs/Public/show_bug.cgi?id=18#c5
http://www.w3.org/Bugs/Public/show_bug.cgi?id=785#c13
http://www.w3.org/Bugs/Public/show_bug.cgi?id=785#c14


>> 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...

An idea/patch is already avaiable at
http://www.w3.org/Bugs/Public/show_bug.cgi?id=18

Maybe it has to be improved and adjusted to current code, but it is a  
beginning.


Sierk

-- 
Sierk Bornemann
email:            sierkb@gmx.de
WWW:              http://sierkbornemann.de/

Received on Tuesday, 31 July 2007 11:49:26 UTC