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 801 - Improved error message for HttpInvalidValueException
Summary: Improved error message for HttpInvalidValueException
Status: NEW
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: media type (show other bugs)
Version: CSS Validator
Hardware: Other other
: P3 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-16 11:32 UTC by Xavier Robin
Modified: 2007-07-19 09:13 UTC (History)
0 users

See Also:


Attachments

Description Xavier Robin 2004-06-16 11:32:08 UTC
On http://smilissimo.free.fr I have a link to the validator on the bottom of the
page ("CSS2"). If I click on it, I get the following error :
Validator
Error
Target: http://smilissimo.free.fr/
org.w3c.www.http.HttpInvalidValueException: Invalid content type. 

I looked at the HTTP headers with Mozilla's Live Http headers, and the
content-type of my CSS are text/css.
It sounds quite like Bug 232, but the error has no number.

If the error is on my server side, the error message needs to be improved.
Comment 1 Bj 2004-06-16 11:48:28 UTC
http://cgi.w3.org/cgi-bin/headers?url=http%3A%2F%2Fsmilissimo.free.fr

  HTTP/1.1 200 OK
  Date: Wed, 16 Jun 2004 15:45:22 GMT
  Server: Apache1.3.29 - ProXad [Jun  9 2004 15:20:12]
  X-Powered-By: PHP/4.3.4
  Connection: close
  Content-Type: text/html; charset:utf-8

The CSS Validator chokes on the "charset:utf-8" part which should 
be "charset=utf-8".
Comment 2 Xavier Robin 2004-06-16 12:04:24 UTC
Ok, sorry.
Perhaps the error message should say a little more or redirect on the link you gave.
Comment 3 Xavier Robin 2004-06-20 04:09:49 UTC
The HTML validator doesn't chokes on this error and accept "charset:utf-8".
Comment 4 Ville Skyttä 2004-06-20 08:49:54 UTC
The markup validator does indeed "accept" charset:utf-8 in the sense that it
won't bail out if it is present in the Content-Type header.  But it means no
more than exactly that.

As far as the markup validator is concerned, "charset:utf-8" in the Content-Type
header does not mean that the character set of the document is utf-8, it just
means that there is a parameter without a value named "charset:utf-8" in the
header.  Technically, that is somewhat incorrect and the markup validator could
abort as well, because the colon (":") is not allowed in parameter names, ie.
"tokens".
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6
http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2

An possible fix for the CSS validator would be to print the value of the content
type it treats as invalid in the error message, or just skip it silently like
the markup validator does.