Index: tools/testing/dart/http_server.dart |
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart |
index 0254ad10d107544a5baa283317270634687f064f..8d233a83a0000ed525aa73635bb8b3b26d4d3194 100644 |
--- a/tools/testing/dart/http_server.dart |
+++ b/tools/testing/dart/http_server.dart |
@@ -42,6 +42,13 @@ void startHttpServer(String host, int port) { |
} |
}; |
+ // Echos back the contents of the request as the response data. |
+ _httpServer.addRequestHandler((req) => req.path == "/echo", (request, resp) { |
+ resp.headers.set("Access-Control-Allow-Origin", "*"); |
+ |
+ request.inputStream.pipe(resp.outputStream); |
+ }); |
+ |
_httpServer.listen(host, port); |
} |