-
-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Download from Redirected Url #31
Comments
Hi @ghost1372 , |
any news? |
This seems to be due to the .NET Core Design, i tested with .Net Framework and File Downloaded
But in this case, downloader is not able to recognize the file name and extension, Instead of getting the name and extension of the second link, it getting the details of the first link |
@ghost1372 |
Now, I tested the given URL in I don't know why, but the redirection problem solved by changing the private async Task FetchResponseHeaders()
{
try
{
// Previous codes
}
catch (WebException exp) when (exp.Response is HttpWebResponse response &&
response.StatusCode == HttpStatusCode.Found &&
response.SupportsHeaders)
{
// https://github.com/dotnet/runtime/issues/23264
var redirectLocation = exp.Response?.Headers["location"];
if (string.IsNullOrWhiteSpace(redirectLocation) == false)
{
Address = new Uri(redirectLocation);
await FetchResponseHeaders();
}
}
} I push this code to develop branch. please test this branch and if it's ok then I publish a new version. |
Thank you @bezzad |
@bezzad i found that this method can help us to get redirected url
|
I want to change |
any news? |
unfortunately nothing :) |
I solved this problem in the new version. But I did not find a link to do another test. But it was ok in the integration tests. |
Tnx |
Seems I have a similar problem. 90% of times the download is corrupted..
|
@WellitonToledo This issue is about Redirecting the download URL to another link. But I checked your mentioned address and it has no redirect URL. Also, it hadn't any other issues in downloading. |
What would you like me to do about this situation |
Hi, Hope you are well
It seems that it is not possible to download from the server that forwards the download link to another address.
For example, the following address will not be downloaded
https://isubtitles.org/download/arrow/farsi-persian/1801961
If you try with Internet Download Manager, you will see that this link is transferred to:
https://file.isubtitles.org/2020/11/16/arrow-farsi-persian-1801961.zip
The text was updated successfully, but these errors were encountered: