marc        97/02/06 22:36:10

  Modified:    src       CHANGES mod_negotiation.c
  Log:
  Fix handling of languages when lang_index == -1 in is_variant_better().
  Closes PR#155,94
  
  Submitted by: [EMAIL PROTECTED]
  Reviewed by: Paul Sutton, Marc Slemko, Dean Gaudet
  
  Revision  Changes    Path
  1.147     +4 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -C3 -r1.146 -r1.147
  *** CHANGES   1997/02/06 21:45:45     1.146
  --- CHANGES   1997/02/07 06:36:06     1.147
  ***************
  *** 1,5 ****
  --- 1,9 ----
    Changes with Apache 1.2b7
    
  +   *) Fix handling of lang_index in is_variant_better().  This was
  +      causing problems which resulted in the server sending the
  +      wrong language document in some cases.
  + 
      *) Remove free() from clean_env() in suexec wrapper. This was nuking
         the clean environment on some systems.
    
  
  
  
  1.31      +3 -2      apache/src/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -C3 -r1.30 -r1.31
  *** mod_negotiation.c 1997/01/20 04:28:15     1.30
  --- mod_negotiation.c 1997/02/07 06:36:07     1.31
  ***************
  *** 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;
        }
  
  
  

Reply via email to