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

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/server.dart

Issue 126033002: Fix barback-server when seeing a non-ascii error string. (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 | sdk/lib/_internal/pub/pub.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/server.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/server.dart b/sdk/lib/_internal/pub/lib/src/barback/server.dart
index cb6c46eb364118de5dc42c1230f0bc46a8e92aa9..ab8f121d809d3f0cd49eda97d988c4bfe58bcfae 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/server.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/server.dart
@@ -88,6 +88,10 @@ class BarbackServer {
return;
}
+ // Set content-type to force UTF-8 encoding.
+ request.response.headers.contentType =
+ ContentType.parse("text/html; charset=utf-8");
Bob Nystrom 2014/01/09 20:58:11 Won't this affect anyone doing HTTP in Dart who pu
nweiz 2014/01/09 21:01:27 If this is only for error-handling, we should move
Anders Johnsen 2014/01/10 08:52:27 HTTP requests/responses uses Latin1 by default. Th
+
if (request.method != "GET" && request.method != "HEAD") {
_methodNotAllowed(request);
return;
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/pub.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698