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

Unified Diff: tools/testing/dart/http_server.dart

Issue 17274002: Revert 24086 Update checked in binary to version 0.5.19.0 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « tools/testing/dart/browser_controller.dart ('k') | tools/testing/dart/multitest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/http_server.dart
===================================================================
--- tools/testing/dart/http_server.dart (revision 24095)
+++ tools/testing/dart/http_server.dart (working copy)
@@ -7,6 +7,7 @@
import 'dart:async';
import 'dart:io';
import 'dart:isolate';
+import 'dart:uri';
import 'test_suite.dart'; // For TestUtils.
// TODO(efortuna): Rewrite to not use the args library and simply take an
// expected number of arguments, so test.dart doesn't rely on the args library?
@@ -208,7 +209,7 @@
void _handleWebSocketRequest(HttpRequest request) {
WebSocketTransformer.upgrade(request).then((websocket) {
websocket.listen((data) {
- websocket.add(data);
+ websocket.send(data);
websocket.close();
}, onError: (e) {
DebugLogger.warning('HttpServer: error while echoing to WebSocket', e);
@@ -313,10 +314,10 @@
var headerOrigin = request.headers.value('Origin');
var allowedOrigin;
if (headerOrigin != null) {
- var origin = Uri.parse(headerOrigin);
+ var origin = new Uri(headerOrigin);
// Allow loading from http://*:$allowedPort in browsers.
allowedOrigin =
- '${origin.scheme}://${origin.host}:${allowedPort}';
+ '${origin.scheme}://${origin.domain}:${allowedPort}';
} else {
// IE10 appears to be bugged and is not sending the Origin header
// when making CORS requests to the same domain but different port.
« no previous file with comments | « tools/testing/dart/browser_controller.dart ('k') | tools/testing/dart/multitest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698