dgaudet     97/07/19 01:16:15

  Modified:    src       mod_negotiation.c
  Log:
  PR#94: Content negot fails unless each varient has a charset
  This was applied to 1.2.1 but missed in 1.3.  We also include here a
  later update from Paul.
  
  Reviewed by:  Dean Gaudet, Alexei Kosut, Randy Terbush
  Submitted by: Paul Sutton
  
  Revision  Changes    Path
  1.50      +12 -5     apache/src/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -C3 -r1.49 -r1.50
  *** mod_negotiation.c 1997/07/17 22:27:40     1.49
  --- mod_negotiation.c 1997/07/19 08:16:14     1.50
  ***************
  *** 1443,1450 ****
            /* If the best variant's charset is ISO-8859-1 and this variant has
               the same charset quality, then we prefer this variant */
            if (variant->charset_quality == best->charset_quality &&
  !             (best->content_charset == NULL || *best->content_charset == 0 ||
  !             strcmp(best->content_charset, "iso-8859-1") == 0)) {
                *p_bestq = q;
                return 1;
        }
  --- 1443,1454 ----
            /* If the best variant's charset is ISO-8859-1 and this variant has
               the same charset quality, then we prefer this variant */
            if (variant->charset_quality == best->charset_quality &&
  !             (variant->content_charset != NULL &&
  !              *variant->content_charset != '\0' &&
  !              strcmp(variant->content_charset, "iso-8859-1") != 0) &&
  !             (best->content_charset == NULL ||
  !              *best->content_charset == '\0' ||
  !              strcmp(best->content_charset, "iso-8859-1") == 0)) {
                *p_bestq = q;
                return 1;
        }
  ***************
  *** 1542,1550 ****
        /* If the best variant's charset is ISO-8859-1 and this variant has
           the same charset quality, then we prefer this variant */
        if (variant->charset_quality > best->charset_quality ||
  !         (variant->charset_quality == best->charset_quality &&
  !         (best->content_charset == NULL || *best->content_charset == 0 ||
  !         strcmp(best->content_charset, "iso-8859-1") == 0))) {
            *p_bestq = q;
            return 1;
        }
  --- 1546,1557 ----
        /* If the best variant's charset is ISO-8859-1 and this variant has
           the same charset quality, then we prefer this variant */
        if (variant->charset_quality > best->charset_quality ||
  !     ((variant->content_charset != NULL &&
  !           *variant->content_charset != '\0' &&
  !       strcmp(variant->content_charset, "iso-8859-1") != 0) &&
  !      (best->content_charset == NULL ||
  !       *best->content_charset == '\0' ||
  !       strcmp(best->content_charset, "iso-8859-1") == 0))) {
            *p_bestq = q;
            return 1;
        }
  
  
  

Reply via email to