MCPcopy Create free account
hub / github.com/apache/httpd / set_default_lang_quality

Function set_default_lang_quality

modules/mappers/mod_negotiation.c:1484–1501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1482 */
1483
1484static void set_default_lang_quality(negotiation_state *neg)
1485{
1486 var_rec *avail_recs = (var_rec *) neg->avail_vars->elts;
1487 int j;
1488
1489 if (!neg->dont_fiddle_headers) {
1490 for (j = 0; j < neg->avail_vars->nelts; ++j) {
1491 var_rec *variant = &avail_recs[j];
1492 if (variant->content_languages &&
1493 variant->content_languages->nelts) {
1494 neg->default_lang_quality = 0.0001f;
1495 return;
1496 }
1497 }
1498 }
1499
1500 neg->default_lang_quality = 1.0f;
1501}
1502
1503/* Set the language_quality value in the variant record. Also
1504 * assigns lang_index for ForceLanguagePriority.

Callers 1

best_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected