Lines Matching refs:best
193 * present in the best matching Accept header element.
1435 * language_quality - the 'q' value of the 'best' matching language
1442 * When we do the variant checking for best variant, we use language
1510 * of the 'best' matching language on the Accept-Language
1511 * header. The 'best' match is the language on Accept-Language
1517 * When a variant has multiple languages, we find the 'best'
1560 /* Variant has one (or more) languages. Look for the best
1563 * Accept-Language header. The best match is the longest
1565 * best q value from all the languages on the variant
1575 accept_rec *best = NULL, *star = NULL;
1593 /* now find the best (i.e. longest) matching
1594 * Accept-Language header language. We put the best match
1596 * overall best (based on q value) because the best match
1618 * header the best match for the variant language tag
1619 * if it is longer than the previous best match.
1660 /* Finished looking at Accept-Language headers, the best
1663 if (!best ||
1664 (bestthistag && bestthistag->quality > best->quality)) {
1665 best = bestthistag;
1682 ((best && star->quality > best->quality) ||
1683 (!best)) ) {
1684 best = star;
1688 variant->lang_quality = best ? best->quality : fiddle_q;
1692 /* Handle the ForceDefaultLanguage overrides, based on the best match
1693 * to LanguagePriority order. The best match is the lowest index of
1766 /* For a given variant, find the best matching Accept: header
1769 * determining the best matching variant.
1795 * looking for the 'best' match with this variant's
1796 * content-type. We use the best match's quality
1800 * The best match is determined like this:
2019 * of the variant selection algorithm. alg_list means that no best
2020 * variant was found by the algorithm, alg_choice means that a best
2023 * way here. The best variant is returned in *pbest. best_match has
2024 * two possible algorithms for determining the best variant: the
2041 var_rec *best, float *p_bestq)
2060 * is for the algorithm to operate on the best available precision
2092 /* If the best variant's encoding is of lesser quality than
2095 if (variant->encoding_quality > best->encoding_quality) {
2108 var_rec *best, float *p_bestq)
2119 * This variant is worse than current best: return 0
2120 * This variant is better than the current best:
2122 * This variant is just as desirable as the current best:
2165 if (q > bestq || !best) {
2171 if (variant->lang_quality < best->lang_quality) {
2174 if (variant->lang_quality > best->lang_quality) {
2180 if (best->lang_index != -1 &&
2181 (variant->lang_index == -1 || variant->lang_index > best->lang_index)) {
2185 (best->lang_index == -1 || variant->lang_index < best->lang_index)) {
2193 levcmp = level_cmp(variant, best);
2203 if (variant->charset_quality < best->charset_quality) {
2206 /* If the best variant's charset is ISO-8859-1 and this variant has
2210 if (variant->charset_quality > best->charset_quality ||
2214 (best->content_charset == NULL ||
2215 *best->content_charset == '\0' ||
2216 strcmp(best->content_charset, "iso-8859-1") == 0))) {
2223 if (variant->encoding_quality < best->encoding_quality) {
2226 if (variant->encoding_quality > best->encoding_quality) {
2232 if (find_content_length(neg, variant) >= find_content_length(neg, best)) {
2287 var_rec *best;
2320 * Find the 'best' variant
2323 * best variant. In that case forget the preferred language and
2328 best = NULL;
2352 * do it even if we do not actually plan to find a best
2375 * best, either using the RVSA/1.0 algorithm, or Apache's
2382 if (is_variant_better_rvsa(neg, variant, best, &bestq)) {
2383 best = variant;
2387 if (is_variant_better(neg, variant, best, &bestq)) {
2388 best = variant;
2394 /* We now either have a best variant, or no best variant */
2398 * only a choice response if the best variant has q>0
2401 algorithm_result = (best && best->definite) && (bestq > 0) ?
2410 if (preferred_language && (!best || algorithm_result != alg_choice)) {
2425 *pbest = best;
2738 * transparent multiviews resource as the best variant.
2741 * selects a _non_transparent multiviews resource as the best
2757 * selects, as the best variant, another type map which itself
2877 * alg_choice: a best variant is chosen
2878 * alg_list: no best variant is chosen
2971 var_rec *best;
2984 res = do_negotiation(r, neg, &best, 0);
2987 if (best->body)
3011 ap_set_content_length(r, best->bytes);
3014 if (best->mime_type && *best->mime_type) {
3015 if (best->content_charset && *best->content_charset) {
3017 best->mime_type,
3019 best->content_charset,
3023 ap_set_content_type(r, apr_pstrdup(r->pool, best->mime_type));
3028 if (best->content_languages && best->content_languages->nelts) {
3030 best->content_languages);
3034 if (best->content_encoding && *best->content_encoding) {
3036 best->content_encoding);
3048 apr_brigade_insert_file(bb, map, best->body, best->bytes, r->pool);
3067 new_req = apr_pstrcat(r->pool, udir, best->file_name,
3071 new_req = apr_pstrcat(r->pool, udir, best->file_name,
3076 new_req = apr_pstrcat(r->pool, udir, best->file_name,
3086 var_rec *best, *avail_recs;
3114 res = do_negotiation(r, neg, &best,
3120 if (!(sub_req = best->sub_req)) {
3125 sub_req = ap_sub_req_lookup_file(best->file_name, r, r->output_filters);
3151 if (variant != best && variant->sub_req) {
3161 * (i.e. gzip). To try and deal with this as best as possible we do