Prepare for Uint8List SDK breaking changes (#34295)
https://github.com/dart-lang/sdk/issues/36900
This commit is contained in:
@@ -65,7 +65,7 @@ class Upload {
|
||||
} else {
|
||||
// TODO(hansmuller): only retry on 5xx and 429 responses
|
||||
logMessage('Request to save "$name" (length ${content.length}) failed with status ${response.statusCode}, will retry');
|
||||
logMessage(await response.transform<String>(utf8.decoder).join());
|
||||
logMessage(await response.cast<List<int>>().transform<String>(utf8.decoder).join());
|
||||
}
|
||||
return response.statusCode == HttpStatus.ok;
|
||||
} on TimeoutException catch (_) {
|
||||
|
||||
@@ -299,7 +299,7 @@ Future<void> precacheLanguageAndRegionTags() async {
|
||||
final HttpClient client = HttpClient();
|
||||
final HttpClientRequest request = await client.getUrl(Uri.parse(registry));
|
||||
final HttpClientResponse response = await request.close();
|
||||
final String body = (await response.transform<String>(utf8.decoder).toList()).join('');
|
||||
final String body = (await response.cast<List<int>>().transform<String>(utf8.decoder).toList()).join('');
|
||||
client.close(force: true);
|
||||
final List<Map<String, List<String>>> sections = body.split('%%').skip(1).map<Map<String, List<String>>>(_parseSection).toList();
|
||||
for (Map<String, List<String>> section in sections) {
|
||||
|
||||
Reference in New Issue
Block a user