Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index c1272d3e12a7bb28d34e22eef687cb07e2ed1b25..1de89c4c762b9e7fb367ceedd342bfbc60b1defc 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -375,8 +375,16 @@ abstract class _HttpOutboundMessage<T> implements IOSink { |
_ioSink.write(string); |
} |
- void writeAll(Iterable objects) { |
- for (Object obj in objects) write(obj); |
+ void writeAll(Iterable objects, [String separator = ""]) { |
+ bool isFirst = true; |
+ for (Object obj in objects) { |
+ if (isFirst) { |
+ isFirst = false; |
+ } else { |
+ if (separator != "") write(separator); |
+ } |
+ write(obj); |
+ } |
} |
void writeln([Object obj = ""]) { |
@@ -1635,7 +1643,9 @@ class _DetachedSocket extends Stream<List<int>> implements Socket { |
void writeCharCode(int charCode) => _socket.writeCharCode(charCode); |
- void writeAll(Iterable objects) => _socket.writeAll(objects); |
+ void writeAll(Iterable objects, [String separator = ""]) { |
+ _socket.writeAll(objects, separator); |
+ } |
void writeBytes(List<int> bytes) => _socket.writeBytes(bytes); |