diff options
author | Alexander Færøy <ahf@torproject.org> | 2017-05-08 13:52:40 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2017-05-12 17:18:45 +0200 |
commit | fbef257c43b90bd5d80831808e162c57ce876283 (patch) | |
tree | ce1cafc344a6092879af738224afcf71f3ebd309 /src/or/directory.c | |
parent | ca632144e59304ce2e41a32ddd1cf302d651cc68 (diff) | |
download | tor-fbef257c43b90bd5d80831808e162c57ce876283.tar.gz tor-fbef257c43b90bd5d80831808e162c57ce876283.zip |
Handle x-zstd and x-tor-lzma in parse_http_response().
See: https://bugs.torproject.org/21667
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 83a2e6c598..c7c3d38e8a 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -2056,6 +2056,10 @@ parse_http_response(const char *headers, int *code, time_t *date, *compression = ZLIB_METHOD; } else if (!strcmp(enc, "gzip") || !strcmp(enc, "x-gzip")) { *compression = GZIP_METHOD; + } else if (!strcmp(enc, "x-zstd")) { + *compression = ZSTD_METHOD; + } else if (!strcmp(enc, "x-tor-lzma")) { + *compression = LZMA_METHOD; } else { log_info(LD_HTTP, "Unrecognized content encoding: %s. Trying to deal.", escaped(enc)); |