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

Unified Diff: pkg/http/lib/src/response.dart

Issue 22872012: Remove Encoding-enum from dart:io and add interface in dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix ddbg. 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: pkg/http/lib/src/response.dart
diff --git a/pkg/http/lib/src/response.dart b/pkg/http/lib/src/response.dart
index b7e0a481da810db6a4884f9e974a727fb5b0a41e..7a0beaad749c68d9dbc18c72e2adb510ce4cf9d8 100644
--- a/pkg/http/lib/src/response.dart
+++ b/pkg/http/lib/src/response.dart
@@ -5,6 +5,7 @@
library response;
import 'dart:async';
+import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';
@@ -21,7 +22,7 @@ class Response extends BaseResponse {
/// The body of the response as a string. This is converted from [bodyBytes]
/// using the `charset` parameter of the `Content-Type` header field, if
/// available. If it's unavailable or if the encoding name is unknown,
- /// [Encoding.ISO_8859_1] is used by default, as per [RFC 2616][].
+ /// [LATIN1] is used by default, as per [RFC 2616][].
///
/// [RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html
String get body => decodeString(bodyBytes, _encodingForHeaders(headers));
@@ -80,7 +81,7 @@ class Response extends BaseResponse {
}
/// Returns the encoding to use for a response with the given headers. This
-/// defaults to [Encoding.ISO_8859_1] if the headers don't specify a charset or
+/// defaults to [LATIN1] if the headers don't specify a charset or
/// if that charset is unknown.
Encoding _encodingForHeaders(Map<String, String> headers) =>
encodingForCharset(_contentTypeForHeaders(headers).charset);

Powered by Google App Engine
This is Rietveld 408576698