Skip to content

Commit c9b8f36

Browse files
authored
Merge pull request #409 from gabf3st/feature/fix-redirect-url
Fix wrong base URL on Redirect multiple url
2 parents 3d8be89 + 2145695 commit c9b8f36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/vn/hunghd/flutterdownloader/DownloadWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ private void downloadFile(Context context, String fileURL, String savedDir, Stri
284284
log("Response with redirection code");
285285
location = httpConn.getHeaderField("Location");
286286
log("Location = " + location);
287-
base = new URL(fileURL);
287+
base = new URL(url);
288288
next = new URL(base, location); // Deal with relative URLs
289289
url = next.toExternalForm();
290290
log("New url: " + url);

0 commit comments

Comments
 (0)