Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index b0a1d8fb35b4847b094593bf2f02beb3a96482f4..7b80d6a7c14802161fa92ea5e68f7f3087e33fe2 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -270,7 +270,8 @@ class _HttpClientResponse |
return new Stream.fromIterable([]).listen(null, onDone: onDone); |
} |
var stream = _incoming; |
- if (headers.value(HttpHeaders.CONTENT_ENCODING) == "gzip") { |
+ if (_httpClient.autoUncompress && |
+ headers.value(HttpHeaders.CONTENT_ENCODING) == "gzip") { |
stream = stream.transform(GZIP.decoder); |
} |
return stream.listen(onData, |
@@ -1650,6 +1651,8 @@ class _HttpClient implements HttpClient { |
int maxConnectionsPerHost; |
+ bool autoUncompress = true; |
+ |
String userAgent = _getHttpVersion(); |
void set idleTimeout(Duration timeout) { |