httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: mod_negotiation/155: Bad handling of lang_index == -1 in is_variant_better().
Date Thu, 06 Feb 1997 22:11:18 GMT
+1

On Thu, 6 Feb 1997, Paul Sutton wrote:

> On Wed, 5 Feb 1997, Petr Lampa wrote:
> > >Number:         155
> > >Category:       mod_negotiation
> > >Synopsis:       Bad handling of lang_index == -1 in is_variant_better().
> 
> This is also reported in PR#94. The suggested patch (with a couple of
> typos fixed)  fixes the problem. This is already on our to-fix list for
> 1.2b7. +1. 
> 
> //pcs
> 
> *** mod_negotiation.c.cvs	Thu Feb  6 09:13:11 1997
> --- mod_negotiation.c	Thu Feb  6 09:27:47 1997
> ***************
> *** 1482,1490 ****
>       
>       /* if language qualities were equal, try the LanguagePriority
>        * stuff */
> !     if (variant->lang_index > best->lang_index)
>           return 0;
> !     if (variant->lang_index < best->lang_index) {
>           *p_bestq = q;
>           return 1;
>       }
> --- 1482,1491 ----
>       
>       /* if language qualities were equal, try the LanguagePriority
>        * stuff */
> !     if (best->lang_index != -1 && variant->lang_index > best->lang_index)
>           return 0;
> !     if (variant->lang_index != -1 &&
> !         (variant->lang_index < best->lang_index || best->lang_index ==
-1)) {
>           *p_bestq = q;
>           return 1;
>       }
> 
> 


Mime
View raw message