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

Unified Diff: pkg/http_server/lib/src/http_multipart_form_data_impl.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 typo. 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
« no previous file with comments | « pkg/http_server/lib/src/http_body_impl.dart ('k') | pkg/http_server/test/http_body_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http_server/lib/src/http_multipart_form_data_impl.dart
diff --git a/pkg/http_server/lib/src/http_multipart_form_data_impl.dart b/pkg/http_server/lib/src/http_multipart_form_data_impl.dart
index 8b313aa1bdc12da348712a04f7ea821dea849bb4..7956c0f0bb3400bacda1fac8db0170943f6ab30c 100644
--- a/pkg/http_server/lib/src/http_multipart_form_data_impl.dart
+++ b/pkg/http_server/lib/src/http_multipart_form_data_impl.dart
@@ -34,11 +34,11 @@ class _HttpMultipartFormData extends Stream implements HttpMultipartFormData {
StringBuffer buffer = new StringBuffer();
Encoding encoding;
if (contentType != null) {
- encoding = Encoding.fromName(contentType.charset);
+ encoding = Encoding.getByName(contentType.charset);
}
- if (encoding == null) encoding = Encoding.ISO_8859_1;
+ if (encoding == null) encoding = LATIN1;
_stream = _stream
- .transform(new StringDecoder(encoding))
+ .transform(encoding.decoder)
.expand((data) {
buffer.write(data);
var out = _decodeHttpEntityString(buffer.toString());
« no previous file with comments | « pkg/http_server/lib/src/http_body_impl.dart ('k') | pkg/http_server/test/http_body_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698