|
@@ -2814,20 +2814,6 @@ parse_accept_encoding_header(const char *h)
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-/** Bitmask of supported compression types, to use in a bitwise "and"
|
|
|
- * with the results of parse_accept_encoding_header */
|
|
|
-static const unsigned SUPPORTED_COMPRESSION_MASK =
|
|
|
- (1u << NO_METHOD)
|
|
|
- | (1u << ZLIB_METHOD)
|
|
|
- | (1u << GZIP_METHOD)
|
|
|
-#ifdef HAVE_ZSTD
|
|
|
- | (1u << ZSTD_METHOD)
|
|
|
-#endif
|
|
|
-#ifdef HAVE_LZMA
|
|
|
- | (1u << LZMA_METHOD)
|
|
|
-#endif
|
|
|
- ;
|
|
|
-
|
|
|
/** Decide whether a client would accept the consensus we have.
|
|
|
*
|
|
|
* Clients can say they only want a consensus if it's signed by more
|
|
@@ -3028,7 +3014,7 @@ directory_handle_command_get,(dir_connection_t *conn, const char *headers,
|
|
|
}
|
|
|
|
|
|
/* Remove all methods that we don't both support. */
|
|
|
- compression_methods_supported &= SUPPORTED_COMPRESSION_MASK;
|
|
|
+ compression_methods_supported &= tor_compress_get_supported_method_bitmask();
|
|
|
|
|
|
get_handler_args_t args;
|
|
|
args.url = url;
|