W3C home > Mailing lists > Public > www-validator@w3.org > June 2017

Re: Source of HTTP Content-Language header

From: Michael[tm] Smith <mike@w3.org>
Date: Tue, 6 Jun 2017 07:33:47 +0900
To: "Widmer, Christoph" <Christoph.Widmer@sonova.com>
Cc: "Jukka K. Korpela" <jukkakk@gmail.com>, "www-validator@w3.org" <www-validator@w3.org>
Message-ID: <20170605223347.bbjkwngzn6rirf33@sideshowbarker.net>
"Widmer, Christoph" <Christoph.Widmer@sonova.com>, 2017-06-05 18:58 +0000:
> Archived-At: <http://www.w3.org/mid/9CC1F42D98512745A73182680F8EFB24017E96B3CB@CH01SW0722.corp.ads>
> ...
> What I don't understand is why this warning appears for some of our
> pages, but not for others. There is no warning for instance for
> www.f3historic.com/calendar.php<http://www.f3historic.com/calendar.php>
> yet the validator shows a warning for
> www.f3historic.com/calendar.php<http://www.f3historic.com/calendar.php>
> but both show the same information regarding content language (fr) in the
> HTTP header and language in the HTML start tag (en) when I look at them
> in www.rexswain.com/httpview.html<http://www.rexswain.com/httpview.html>.

Whether or not the warning appears depends in part on the size of the document
being checked. For short documents with less than 1024 characters of visible
text content, the language detector doesn’t get run at all, so no warning will
ever be emitted for those even if there’s a mismatch.

The reason for that 1024-character limit is, I’ve found in practice that the
language-detection library the checker relies on for this can’t reliably detect
the language of some Web documents with less content than that.


> So, this warning appears to be inconsistent or an outright bug in the
> validator.
> Best regards, Christoph
> On Mon, Jun 5, 2017 at 1:23 PM, Widmer, Christoph <Christoph.Widmer@sonova.com<mailto:Christoph.Widmer@sonova.com>> wrote:
> The W3 Validator reports a content language warning for my www.f3historic.com<http://www.f3historic.com> website. It says that
> The value of the HTTP Content-Language header is "fr" but it will be ignored because the html start tag has lang="en".
> It is a warning only, since the conflict is resolved by the specifications. In principle, however, programs might use the Content-Language header value when dealing with the docuement as a whole. So it is useful that the problem is pointed out-
> I checked all files and couldn't find any reference to the content language header being set to French. Could you please modify the W3 Validator such that it shows the location of the content language header, just like it does for the HTML start tag.
> It is nowhere in the HTML document. It is in HTTP headers that accompany it and are sent according to some logic. This cannot be studied from outside, only “inside” the server. We can just see the headers sent. They can be inspected using various debugging tools in browsers or, perhaps best for casual use, using an online HTTP header viewer like http://www.rexswain.com/httpview.html
> Perhaps the validator should echo the HTTP response headers, at least if an option for that is selected. However, there’s a risk in adding the amount of output. And if you had to check an option to get the headers, the odds are that users who would need them would not find it and understand it.
> Yucca
> ________________________________
> This message was received from the internet - please ascertain yourself of the identity of the sender, and the legitimacy of any action asked of you. Do not follow any instructions unless you are certain they are valid, and rightful. This applies in particular to financial transactions, disclosure of confidential company information and account details.
> ________________________________
> MID 04955
> ******************** 
> Legal Notice: 
> The information in this electronic transmission may contain confidential or
> legally privileged information and is intended solely for the individual(s)
> named above. If you are not an intended recipient or an authorized agent,
> you are hereby notified that reading, distributing, or otherwise
> disseminating, copying or taking any action based on the contents of this
> transmission is strictly prohibited. Any unauthorized interception of this
> transmission is illegal under law. If you have received this transmission in
> error, please notify the sender by telephone [at the number indicated above/
> on +41 58 928 0101] as soon as possible and then destroy all copies of this
> transmission. 
> ********************
> MID 04951

Michael[tm] Smith https://people.w3.org/mike

Received on Monday, 5 June 2017 22:34:17 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 June 2017 08:03:06 UTC