From: short <> Date: Sun, 13 Mar 2005 11:58:58 +0000 (+0000) Subject: Fixed "application/xhtml+xml" negotiation for undecided clients. X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=commitdiff_plain;h=1ee642491d049abd3ee7324f395940f1650436bf Fixed "application/xhtml+xml" negotiation for undecided clients. --- diff --git a/Web.pm b/Web.pm index 2d8b988..456e7c8 100644 --- a/Web.pm +++ b/Web.pm @@ -737,17 +737,22 @@ my($class)=@_; # Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217 my $mime=$class->Negotiate_choose([ # Put the fallback variant as the first one. + # Rate both variants the same to prefer "text/html" for undecided clients. + # At least + # Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217 + # prefers "application/xhtml+xml" over "text/html" itself: + # text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 negotiate_variant( "id"=>"text/html", "content-type"=>"text/html", - "qs"=>0.5, + "qs"=>0.6, "charset"=>$client_charset, "lang"=>$lang, ), negotiate_variant( "id"=>"application/xhtml+xml", "content-type"=>"application/xhtml+xml", - "qs"=>0.9, + "qs"=>0.6, "charset"=>$client_charset, "lang"=>$lang, ),