microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.93k stars 1.42k forks source link

Winget should support 302 redirect package URLs #1115

Open palenshus opened 3 years ago

palenshus commented 3 years ago

Brief description of your issue

It seems that winget at some point supported 302 redirect package URLs, for example https://download.qt.io/official_releases/qtcreator/4.15/4.15.0/qt-creator-opensource-windows-x86_64-4.15.0.exe

However, it no longer seems to, possibly as a result of using DO.

Steps to reproduce

Create singleton.yaml manifest file:

PackageIdentifier: TestPublisher.TestApp
PackageVersion: 0.1.2
Installers:
  - Architecture: x64
    InstallerUrl: https://download.qt.io/official_releases/qtcreator/4.15/4.15.0/qt-creator-opensource-windows-x86_64-4.15.0.exe
    InstallerType: exe
    InstallerSha256: ec0d13c102f63b47aeb530386950484974ec1e54f598f1b6591039b26816041c
PackageLocale: en-US
ManifestType: singleton
ManifestVersion: 1.0.0
winget install -m singleton.yaml

Expected behavior

App should download

Actual behavior

Found  [TestPublisher.TestApp]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://download.qt.io/official_releases/qtcreator/4.15/4.15.0/qt-creator-opensource-windows-x86_64-4.15.0.exe
An unexpected error occurred while executing the command:
0x80190003 : Unexpected redirection status code (3xx).

Environment

Windows Package Manager v1.0.11451 Windows: Windows.Desktop v10.0.19043.985 Package: Microsoft.DesktopAppInstaller v1.11.11451.0

JohnMcPMS commented 3 years ago

The problem here is that this URL redirects from HTTPS to HTTP, which DO does not support by default. They are going to add a flag to allow us to request that behavior, but to mitigate the problem I have change #1138

Trenly commented 1 year ago

@JohnMcPMS - Was that DO flag ever implemented?