X-Git-Url: http://git.jankratochvil.net/?p=MyWeb.git;a=blobdiff_plain;f=Web.pm;fp=Web.pm;h=456e7c8bcfd721d12166e2aa86d985469d83e829;hp=2d8b988a8b6e1d82fb8604f3c37a4d208bd0be4e;hb=1ee642491d049abd3ee7324f395940f1650436bf;hpb=7643fe27e75da997d437720d4eb4b86357aa2e65 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, ),