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

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: Addressed review copmments 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
« no previous file with comments | « sdk/lib/io/http.dart ('k') | tests/standalone/io/http_compression_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « sdk/lib/io/http.dart ('k') | tests/standalone/io/http_compression_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698