diff options
author | ot <ot@localhost> | 2007-08-07 02:32:49 +0000 |
---|---|---|
committer | ot <ot@localhost> | 2007-08-07 02:32:49 +0000 |
commit | 10e8145172f43431763a146753935f66bb6a4910 (patch) | |
tree | 2f7e1986f1f81d0d7a190006bcc6651a0499fa93 | |
parent | 73206a16310a8cb3d99d2482e06f692de380a63e (diff) | |
download | markup-validator-10e8145172f43431763a146753935f66bb6a4910.zip markup-validator-10e8145172f43431763a146753935f66bb6a4910.tar.gz markup-validator-10e8145172f43431763a146753935f66bb6a4910.tar.bz2 |
fix for borken language-negotiation cases:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4899
-rwxr-xr-x | httpd/cgi-bin/check | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 4d7aa98..0a120e4 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -14,7 +14,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.554 2007-08-02 05:11:03 ot Exp $ +# $Id: check,v 1.555 2007-08-07 02:32:49 ot Exp $ # # Disable buffering on STDOUT! @@ -186,7 +186,7 @@ Directory not readable (permission denied): @_r # # Strings - $VERSION = q$Revision: 1.554 $; + $VERSION = q$Revision: 1.555 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; # @@ -299,6 +299,9 @@ if (($lang eq '') or (!$lang_ok)) { # use HTTP-based negotiation $lang = HTTP::Negotiate::choose(\@localizations); } +# HTTP::Negotiate::choose may return undef +# e.g if sent Accept-Language: en;q=0 +$lang = 'en_US' if (!defined($lang)); if ($lang eq "en") { $lang = 'en_US'; # legacy |