diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-10 11:09:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-10 11:09:52 -0400 |
commit | 8266d193a608445b0d8675a83733870a2733e2b9 (patch) | |
tree | 2546ecafa62634c37ee3092c3739693fe6ee7872 | |
parent | 5dab99d6a81480278044dfbc1e51e7b7c3cc19e4 (diff) | |
download | tor-8266d193a608445b0d8675a83733870a2733e2b9.tar.gz tor-8266d193a608445b0d8675a83733870a2733e2b9.zip |
Restore wget behavior when fetching compressed objects
We do this by treating the presence of .z as meaning ZLIB_METHOD,
even if Accept-Encoding does not include deflate.
This fixes bug 22206; bug not in any released tor.
-rw-r--r-- | src/or/directory.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 67c28e1f3e..c1db40ef22 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -3516,8 +3516,9 @@ directory_handle_command_get,(dir_connection_t *conn, const char *headers, tor_free(header); } else { compression_methods_supported = (1u << NO_METHOD); - if (zlib_compressed_in_url) - compression_methods_supported |= (1u << ZLIB_METHOD); + } + if (zlib_compressed_in_url) { + compression_methods_supported |= (1u << ZLIB_METHOD); } /* Remove all methods that we don't both support. */ |