winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Should encode package identifier and package version before making api request

Open quoctienkt opened this issue 3 years ago • 0 comments

Brief description of your issue

I built a winget private feed using Asp.net with SQL Server, yes it worked very well. Issue happened when devops team try to prevent special character from url, for example, plus character (+), then winget install command will face error 404 (cannot pass network layer)

What I can suggest is to use encode url for packageIdentifier and packageVersion before making any request, I highly believe it works, this part will not affect the winget-cli project as well!

Let me hear your opinion!

Steps to reproduce

  1. Add Notepad++.Notepad++ to the winget private feed
  2. Prevent plus character from network layer (in my case I use portal azure, app service)
  3. use winget install notepad++ --source myPrivateFeed

Expected behavior

the command work installing "notepad++ " package

Actual behavior

Not found url (404)

Environment

Windows Package Manager v1.3.2691
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.2006
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0

quoctienkt avatar Nov 04 '22 11:11 quoctienkt