Handle x-zstd and x-tor-lzma in parse_http_response().

See: https://bugs.torproject.org/21667
This commit is contained in:
Alexander Færøy 2017-05-08 13:52:40 +02:00
parent ca632144e5
commit fbef257c43
No known key found for this signature in database
GPG Key ID: E15081D5D3C3DB53

View File

@ -2056,6 +2056,10 @@ parse_http_response(const char *headers, int *code, time_t *date,
*compression = ZLIB_METHOD; *compression = ZLIB_METHOD;
} else if (!strcmp(enc, "gzip") || !strcmp(enc, "x-gzip")) { } else if (!strcmp(enc, "gzip") || !strcmp(enc, "x-gzip")) {
*compression = GZIP_METHOD; *compression = GZIP_METHOD;
} else if (!strcmp(enc, "x-zstd")) {
*compression = ZSTD_METHOD;
} else if (!strcmp(enc, "x-tor-lzma")) {
*compression = LZMA_METHOD;
} else { } else {
log_info(LD_HTTP, "Unrecognized content encoding: %s. Trying to deal.", log_info(LD_HTTP, "Unrecognized content encoding: %s. Trying to deal.",
escaped(enc)); escaped(enc));