check for environment variables 'no-gzip' and * 'gzip-only-text/html' to get a behaviour similar * to mod_deflate */
| 2256 | * to mod_deflate |
| 2257 | */ |
| 2258 | static 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 | |
| 2271 | static int best_match(negotiation_state *neg, var_rec **pbest) |
| 2272 | { |
no test coverage detected