Explorar o código

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.
Nick Mathewson %!s(int64=7) %!d(string=hai) anos
pai
achega
8266d193a6
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      src/or/directory.c

+ 3 - 2
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. */