Re: Validator misleads content negotiation; prefers CSS

Hello,

Olivier wanted to continue this discussion in the list. The following
message is a clarification of my recent bug report.

P.S. The site mentioned in the message no longer exhibits this problem
due to restructuring I've made recently.
However, you could easily simulate it by enabling 'Options MultiViews'
in Apache, creating both '/foobar.css' and 'foobar.html' and trying to
access it through Validator as 'http://server/foobar'.

On Mon, Oct 06, 2003 at 02:15:32PM +0200, Ilya Konstantinov wrote:
> On Mon, Oct 06, 2003 at 10:01:04AM +0900, olivier Thereaux wrote:
> > You seem to be talking about the CSS validator, which is a distinct 
> > service to check stylesheets (standalone, or embedded in HTML).
> 
> I'm well aware of the distinction between the HTML Validator and the
> CSS Validator. To clarify: I'm submitting my URL to the form
> present on this URL: http://validator.w3.org/ .
> 
> I type my URL ( http://mail.shiny.co.il/whatis ) into the Address field
> and click "Validate URL...". The form is submitted to:
> http://validator.w3.org/check
> 
> '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'.
> Try it yourself:
> URL "http://mail.shiny.co.il/whatis" has both HTML (accessible directly
> through "http://mail.shiny.co.il/whatis.php") and CSS (accessible
> directly through "http://mail.shiny.co.il/whatis.css").
> When you'll give "http://mail.shiny.co.il/whatis" to the form in
> "http://validator.w3.org", you'll be directed to the CSS Validator!
> 

Received on Tuesday, 7 October 2003 10:59:41 UTC