Rename x-lzma to x-tor-lzma

We shouldn't call it lzma, because we are imposing a limit on the
memory needed for decoding.
This commit is contained in:
Nick Mathewson
2017-05-01 15:31:28 -04:00
parent 4837421d7c
commit c486ef57a3
4 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -313,7 +313,9 @@ static const struct {
} compression_method_names[] = {
{ "gzip", GZIP_METHOD },
{ "deflate", ZLIB_METHOD },
{ "x-lzma", LZMA_METHOD },
// We call this "x-tor-lzma" rather than "x-lzma", because we impose a
// lower maximum memory usage on the decoding side.
{ "x-tor-lzma", LZMA_METHOD },
{ "x-zstd" , ZSTD_METHOD },
{ "identity", NO_METHOD },
+1 -1
View File
@@ -854,7 +854,7 @@ struct testcase_t buffer_tests[] = {
{ "compress/zstd", test_buffers_compress, TT_FORK,
&passthrough_setup, (char*)"x-zstd" },
{ "compress/lzma", test_buffers_compress, TT_FORK,
&passthrough_setup, (char*)"x-lzma" },
&passthrough_setup, (char*)"x-tor-lzma" },
END_OF_TESTCASES
};
+4 -3
View File
@@ -2530,13 +2530,14 @@ test_dir_handle_get_parse_accept_encoding(void *arg)
encodings = parse_accept_encoding_header("gzip");
tt_uint_op(B_NONE|B_GZIP, OP_EQ, encodings);
encodings = parse_accept_encoding_header("x-zstd, deflate, x-lzma");
encodings = parse_accept_encoding_header("x-zstd, deflate, x-tor-lzma");
tt_uint_op(B_NONE|B_ZLIB|B_ZSTD|B_LZMA, OP_EQ, encodings);
encodings = parse_accept_encoding_header("x-zstd, deflate, x-lzma, gzip");
encodings = parse_accept_encoding_header(
"x-zstd, deflate, x-tor-lzma, gzip");
tt_uint_op(B_NONE|B_ZLIB|B_ZSTD|B_LZMA|B_GZIP, OP_EQ, encodings);
encodings = parse_accept_encoding_header("x-zstd,deflate,x-lzma,gzip");
encodings = parse_accept_encoding_header("x-zstd,deflate,x-tor-lzma,gzip");
tt_uint_op(B_NONE|B_ZLIB|B_ZSTD|B_LZMA|B_GZIP, OP_EQ, encodings);
done:
+1 -1
View File
@@ -5753,7 +5753,7 @@ struct testcase_t util_tests[] = {
UTIL_LEGACY(pow2),
COMPRESS(zlib, "deflate"),
COMPRESS(gzip, "gzip"),
COMPRESS(lzma, "x-lzma"),
COMPRESS(lzma, "x-tor-lzma"),
COMPRESS(zstd, "x-zstd"),
UTIL_TEST(gzip_compression_bomb, TT_FORK),
UTIL_LEGACY(datadir),