validator/httpd/cgi-bin check,1.554,1.555

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv24485

Modified Files:
	check 
Log Message:
fix for borken language-negotiation cases:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=4899



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.554
retrieving revision 1.555
diff -u -d -r1.554 -r1.555
--- check	2 Aug 2007 05:11:03 -0000	1.554
+++ check	7 Aug 2007 02:32:49 -0000	1.555
@@ -299,6 +299,9 @@
   $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

Received on Tuesday, 7 August 2007 02:32:53 UTC