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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 120163006: Fix HttpResponse::writeCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | tests/standalone/io/http_server_response_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « no previous file | tests/standalone/io/http_server_response_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698