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

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

Issue 22867033: Update ZLib/GZip in dart:io to be a Codec/Converter from dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add documentation and convert impl. Created 7 years, 4 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 7eaf153f32f879ecb7e82a556766b7bf0448e542..f7b904122793fe3dc6455a7fd190d9a545b05824 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -243,7 +243,7 @@ class _HttpClientResponse
bool cancelOnError}) {
var stream = _incoming;
if (headers.value(HttpHeaders.CONTENT_ENCODING) == "gzip") {
- stream = stream.transform(new ZLibInflater());
+ stream = stream.transform(GZIP.decoder);
}
return stream.listen(onData,
onError: onError,
@@ -516,7 +516,7 @@ abstract class _HttpOutboundMessage<T> implements IOSink {
stream = stream.transform(new _BufferTransformer());
if (headers.chunkedTransferEncoding) {
if (_asGZip) {
- stream = stream.transform(new ZLibDeflater(gzip: true, level: 6));
+ stream = stream.transform(GZIP.encoder);
}
stream = stream.transform(new _ChunkedTransformer());
} else if (contentLength >= 0) {

Powered by Google App Engine
This is Rietveld 408576698