| 222 | } |
| 223 | |
| 224 | void |
| 225 | HostConfiguration::add_compression_algorithms(string &line) |
| 226 | { |
| 227 | compression_algorithms_ = ALGORITHM_DEFAULT; // remove the default gzip. |
| 228 | for (;;) { |
| 229 | string token = extractFirstToken(line, isCommaOrSpace); |
| 230 | if (token.empty()) { |
| 231 | break; |
| 232 | } else if (token == "br") { |
| 233 | #ifdef HAVE_BROTLI_ENCODE_H |
| 234 | compression_algorithms_ |= ALGORITHM_BROTLI; |
| 235 | #else |
| 236 | error("supported-algorithms: brotli support not compiled in."); |
| 237 | #endif |
| 238 | } else if (token == "gzip") { |
| 239 | compression_algorithms_ |= ALGORITHM_GZIP; |
| 240 | } else if (token == "deflate") { |
| 241 | compression_algorithms_ |= ALGORITHM_DEFLATE; |
| 242 | } else { |
| 243 | error("Unknown compression type. Supported compression-algorithms <br,gzip,deflate>."); |
| 244 | } |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | void |
| 249 | HostConfiguration::add_compressible_status_codes(string &line) |
no test coverage detected