W3C home > Mailing lists > Public > www-validator@w3.org > October 2003

Re: Validator misleads content negotiation; prefers CSS

From: Olivier Thereaux <ot@w3.org>
Date: Thu, 9 Oct 2003 15:12:27 +0900
Cc: www-validator@w3.org
To: Ilya Konstantinov <www-validator@future.shiny.co.il>
Message-Id: <8EDF4F6E-FA1F-11D7-9C64-000393A63FC8@w3.org>


On Tuesday, Oct 7, 2003, at 23:56 Asia/Tokyo, Ilya Konstantinov wrote:
> Olivier wanted to continue this discussion in the list. The following
> message is a clarification of my recent bug report.

Thanks for following this up on the mailing-list. It helped me in 
discussing with others (Thanks Terje and Nick) and finding out what 
actually happens.

>> 'check' will be happy to validate whatever I throw at it, either HTML
>> or CSS, according to the Content-Type. To be precise, it won't 
>> validate
>> itself but redirect me to the HTML validator or the CSS
>> validator. So far so good...

>> BUT - what if there's both CSS and HTML at the given URL, and my 
>> server
>> determines which type to send you via content negotiation (a.k.a.
>> Accept-Content header)? Then 'check' will have to express a
>> preference towards either 'text/html' or 'text/css'.
>> FACT - 'check' seems to use the CSS Validator's code for fetching my
>> page, and the CSS Validator prefers 'text/css' over 'text/html'.

Not quite. The fact is that the Markup validator does not "prefer 
anything", it just redirects to the CSS validator (which does prefer 
CSS) when given a CSS resource to validate.

The problem here comes more from your side as it does from ours:
- you are negotiating, on your server, CSS and HTML resources. 
Negotiating should be done among equivalent resources in different 
formats or languages, which means negotiating some content and their 
stylesheet is a bad (abusive) use of format negotiation.
- The markup validator does not (currently) express any preference. As 
far as I can tell it doesn't send any Accept: header at all (need to 
check, though)
- Given the above, your server drives the negotiation and seems to 
prefer CSS to HTML.
- The negotiation gives CSS, and the Markup validator redirects to the 
CSS validator, which does the rest (send the user-agent string and 
accept header your recorded, etc.)

I do acknowledge that to cope with such (wrong) situations the Markup 
Validator should probably send a Accept: header stating a preference 
for content it can validate itself, but the situation should, 
generally, not happen if no-one abuses format negotiation...

Received on Thursday, 9 October 2003 02:12:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:38 UTC