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

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

Issue 22909059: Some more removals of dart:utf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change ArgumentError to FormatException. 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/multipart_request.dart
diff --git a/pkg/http/lib/src/multipart_request.dart b/pkg/http/lib/src/multipart_request.dart
index e0c413a66db678560c30e1232eea3142aabb3b3f..5bbd5b328497539fa68c4f27e754baf0ed715715 100644
--- a/pkg/http/lib/src/multipart_request.dart
+++ b/pkg/http/lib/src/multipart_request.dart
@@ -5,8 +5,8 @@
library multipart_request;
import 'dart:async';
+import 'dart:convert';
import 'dart:math';
-import 'dart:utf';
import 'base_request.dart';
import 'byte_stream.dart';
@@ -62,7 +62,7 @@ class MultipartRequest extends BaseRequest {
fields.forEach((name, value) {
length += "--".length + _BOUNDARY_LENGTH + "\r\n".length +
_headerForField(name, value).length +
- encodeUtf8(value).length + "\r\n".length;
+ UTF8.encode(value).length + "\r\n".length;
});
for (var file in _files) {
@@ -95,7 +95,7 @@ class MultipartRequest extends BaseRequest {
controller.add(string.codeUnits);
}
- writeUtf8(String string) => controller.add(encodeUtf8(string));
+ writeUtf8(String string) => controller.add(UTF8.encode(string));
writeLine() => controller.add([13, 10]); // \r\n
fields.forEach((name, value) {

Powered by Google App Engine
This is Rietveld 408576698