W3C home > Mailing lists > Public > www-validator-cvs@w3.org > August 2007

[Bug 4899] language-negotiation failure leaves $lang undefined, crashes validator

From: <bugzilla@wiggum.w3.org>
Date: Tue, 07 Aug 2007 02:32:26 +0000
CC:
To: www-validator-cvs@w3.org
Message-Id: <E1IIEry-0005e3-Sl@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4899


ot@w3.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dave.null@w3.org            |ot@w3.org
          Component|Templates                   |check
            Summary|Software Error when         |language-negotiation failure
                   |validating with Firefox     |leaves $lang undefined,
                   |                            |crashes validator
   Target Milestone|---                         |0.8.1




------- Comment #4 from ot@w3.org  2007-08-07 02:32 -------
Hi Peter.

Thanks for the very helpful debug trace. I think I figured out the bug, on my
way to patching the validator.

(In reply to comment #2)

> HTML::Template->new() : Cannot open included file
> /usr/local/validator/share/templates/result.tmpl : file not found. 

This should not be happening. The validator is supposed to be looking in
/usr/local/validator/share/templates/[LANGUAGE]/result.tmpl where [LANGUAGE] is
the localization language chosen. Right now, it's always english, the validator
has not been translated yet.

I found that in some (rare) cases, the language detection goes wrong, e.g when
the client sends:

telnet validator.w3.org 80
GET /check?uri=http%3A%2F%2Fvalidator.w3.org HTTP/1.1
Host: validator.w3.org
Accept-Language: en;q=0


Which is the HTTP equivalent of the silly joke:
"give me content in english.... NOT!!!"

I am patching the validator to fall back to its default language when this
happens.
Received on Tuesday, 7 August 2007 02:32:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:24 UTC