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

Function discard_variant_by_env

modules/mappers/mod_negotiation.c:2258–2269  ·  view source on GitHub ↗

check for environment variables 'no-gzip' and * 'gzip-only-text/html' to get a behaviour similar * to mod_deflate */

Source from the content-addressed store, hash-verified

2256 * to mod_deflate
2257 */
2258static int discard_variant_by_env(var_rec *variant, int discard)
2259{
2260 if ( is_identity_encoding(variant->content_encoding)
2261 || !strcmp(variant->content_encoding, "identity")) {
2262 return 0;
2263 }
2264
2265 return ( (discard == DISCARD_ALL_ENCODINGS)
2266 || (discard == DISCARD_ALL_BUT_HTML
2267 && (!variant->mime_type
2268 || strncmp(variant->mime_type, "text/html", 9))));
2269}
2270
2271static int best_match(negotiation_state *neg, var_rec **pbest)
2272{

Callers 1

best_matchFunction · 0.85

Calls 1

is_identity_encodingFunction · 0.85

Tested by

no test coverage detected