Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1569)

Unified Diff: sdk/lib/io/http_impl.dart

Issue 370743003: Add option to HttpClient to turn of auto uncompression (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698