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

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

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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/lib/src/multipart_file.dart ('k') | pkg/http/lib/src/response.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3cd0dc405b32d124d9df8929bdbe7e68a02c8873..4d744c12210b55f67678667bb9413c3eb1886ff7 100644
--- a/pkg/http/lib/src/multipart_request.dart
+++ b/pkg/http/lib/src/multipart_request.dart
@@ -4,6 +4,7 @@
library multipart_request;
+import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:uri';
@@ -106,7 +107,7 @@ class MultipartRequest extends BaseRequest {
writeAscii('--$boundary\r\n');
writeAscii(_headerForFile(file));
return writeInputToInput(file.finalize(), stream)
- .transform((_) => writeLine());
+ .then((_) => writeLine());
}).then((_) {
// TODO(nweiz): pass any errors propagated through this future on to
// the stream. See issue 3657.
@@ -156,7 +157,7 @@ class MultipartRequest extends BaseRequest {
/// [length].
String _boundaryString(int length) {
var prefix = "dart-http-boundary-";
- var list = new List<int>(length - prefix.length);
+ var list = new List<int>.fixedLength(length - prefix.length);
for (var i = 0; i < list.length; i++) {
list[i] = _BOUNDARY_CHARACTERS[
_random.nextInt(_BOUNDARY_CHARACTERS.length)];
« no previous file with comments | « pkg/http/lib/src/multipart_file.dart ('k') | pkg/http/lib/src/response.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698