HTML bugfix: Incorrect URL resolution on redirected pages (#2315)

This commit is contained in:
Imran Remtulla
2025-06-13 16:49:59 -04:00
parent b539f0a926
commit 5f971dcddb
3 changed files with 15 additions and 8 deletions

View File

@@ -360,8 +360,8 @@ Future<File> downloadFile(String url, String fileName, bool fileNameHasExt,
}
var responseWithClient =
await sourceRequestStreamResponse('GET', url, reqHeaders, {});
HttpClient responseClient = responseWithClient.key;
HttpClientResponse response = responseWithClient.value;
HttpClient responseClient = responseWithClient.value.key;
HttpClientResponse response = responseWithClient.value.value;
sink ??= tempDownloadedFile.openWrite(mode: FileMode.writeOnly);
// Perform the download