Index: sdk/lib/io/http_impl.dart |
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart |
index 4c6e74b862dcc67a34a825c5389fa0fbe972a65c..ca47bd85db6a35f0d697fe7100153740040539bd 100644 |
--- a/sdk/lib/io/http_impl.dart |
+++ b/sdk/lib/io/http_impl.dart |
@@ -445,18 +445,22 @@ abstract class _HttpOutboundMessage<T> implements IOSink { |
} |
void write(Object obj) { |
+ if (!_headersWritten) _dataSink.encoding = encoding; |
_dataSink.write(obj); |
} |
void writeAll(Iterable objects, [String separator = ""]) { |
+ if (!_headersWritten) _dataSink.encoding = encoding; |
_dataSink.writeAll(objects, separator); |
} |
void writeln([Object obj = ""]) { |
+ if (!_headersWritten) _dataSink.encoding = encoding; |
_dataSink.writeln(obj); |
} |
void writeCharCode(int charCode) { |
+ if (!_headersWritten) _dataSink.encoding = encoding; |
_dataSink.writeCharCode(charCode); |
} |