fielding 99/02/06 03:58:46
Modified: src CHANGES src/modules/standard mod_negotiation.c Log: Remove charset=ISO-8859-1 fiddle from the RVSA comparison, since RVSA doesn't need such fiddles. Submitted by: Koen Holtman Reviewed by: Roy Fielding Revision Changes Path 1.1236 +3 -2 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1235 retrieving revision 1.1236 diff -u -r1.1235 -r1.1236 --- CHANGES 1999/02/06 11:00:09 1.1235 +++ CHANGES 1999/02/06 11:58:43 1.1236 @@ -6,8 +6,9 @@ *) Remove unused code to disable transparent negotiation when negotiating on encoding only, as we now handle encoding too - (though this is nonstandard for TCN), and fix bugs in debugging - statements within mod_negotiation. [Koen Holtman] + (though this is nonstandard for TCN), remove charset=ISO-8859-1 + fiddle from the fiddle-averse RVSA comparison, and fix bugs in + some debugging statements within mod_negotiation. [Koen Holtman] *) Fixed a rare memory corruption possibility in mod_dir if the index file is negotiable and no acceptable variant can be found. 1.95 +2 -15 apache-1.3/src/modules/standard/mod_negotiation.c Index: mod_negotiation.c =================================================================== RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_negotiation.c,v retrieving revision 1.94 retrieving revision 1.95 diff -u -r1.94 -r1.95 --- mod_negotiation.c 1999/02/06 11:00:15 1.94 +++ mod_negotiation.c 1999/02/06 11:58:45 1.95 @@ -1556,7 +1556,7 @@ } /* For a given variant, find the 'q' value of the charset given - * on the Accept-Charset line. If not charsets are listed, + * on the Accept-Charset line. If no charsets are listed, * assume value of '1'. */ static void set_charset_quality(negotiation_state *neg, var_rec *variant) @@ -1805,19 +1805,6 @@ *p_bestq = q; return 1; } - /* 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; - } } return 0; } @@ -1835,7 +1822,7 @@ /* For non-transparent negotiation, server can choose how * to handle the negotiation. We'll use the following in * order: content-type, language, content-type level, charset, - * content length. + * content encoding, content length. * * For each check, we have three possible outcomes: * This variant is worse than current best: return 0