Index: lib/src/io.dart |
diff --git a/lib/src/io.dart b/lib/src/io.dart |
index 952751c451bf9adb716ac7fa76fb90549be54f77..78b43afb02bc1c8e62a6376322889b5b827009c9 100644 |
--- a/lib/src/io.dart |
+++ b/lib/src/io.dart |
@@ -860,9 +860,12 @@ Future withTempDir(Future fn(String path)) { |
/// |
/// If [host] is "localhost", this will automatically listen on both the IPv4 |
/// and IPv6 loopback addresses. |
-Future<HttpServer> bindServer(String host, int port) { |
- if (host == 'localhost') return HttpMultiServer.loopback(port); |
- return HttpServer.bind(host, port); |
+Future<HttpServer> bindServer(String host, int port) async { |
+ var server = host == 'localhost' |
+ ? await HttpMultiServer.loopback(port) |
+ : await HttpServer.bind(host, port); |
+ server.autoCompress = true; |
+ return server; |
} |
/// Extracts a `.tar.gz` file from [stream] to [destination]. |