Version 2.13.0-166.0.dev
Merge commit 'a7456570500d6497cbbbd04a1fe8da27ac3e4499' into 'dev'
diff --git a/pkg/test_runner/lib/test_runner.dart b/pkg/test_runner/lib/test_runner.dart
index a582751..33f93ba 100644
--- a/pkg/test_runner/lib/test_runner.dart
+++ b/pkg/test_runner/lib/test_runner.dart
@@ -219,10 +219,10 @@
request.headers.add(HttpHeaders.contentTypeHeader, ContentType.json.mimeType);
request.write(requestBody);
var response = await request.close();
- var responseString =
- await response.cast<List<int>>().transform(const Utf8Decoder()).join();
+ var responseString = await const Utf8Decoder().bind(response).join();
client.close();
- var object = jsonDecode(responseString.substring(4)) as Map<String, dynamic>;
+ // Remove XSSI protection prefix )]}'\n before parsing the response.
+ var object = jsonDecode(responseString.substring(5)) as Map<String, dynamic>;
var builds = object["builds"] as List<dynamic>;
if (builds == null || builds.isEmpty) {
throw NoResultsForCommitException(
diff --git a/tools/VERSION b/tools/VERSION
index d039cc2..1c0b0fd 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 13
PATCH 0
-PRERELEASE 165
+PRERELEASE 166
PRERELEASE_PATCH 0
\ No newline at end of file