-
-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
Hi,
I noticed that downloads fail when the server redirects from an HTTPS URL to an HTTP URL.
This happens because HttpClient in .NET does not allow automatic redirection from HTTPS → HTTP by default, even when AllowAutoRedirect is set to true.
Steps to Reproduce
- Attempt to download from an HTTPS URL that responds with a 301/302 redirect to an HTTP endpoint.
- The download fails instead of following the redirect.
Expected Behavior
Downloader should either:
- Handle this scenario explicitly (e.g., allow opt-in following of HTTPS → HTTP redirects), or
- Provide a clear error message that explains why the redirect failed.
Additional Context
Relevant .NET documentation: HttpClientHandler.AllowAutoRedirect — note that HTTPS → HTTP redirects are not allowed.
Would it be possible to add an option (e.g., AllowInsecureRedirects) to support this use case for trusted servers?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
No status