(#3191) Pass custom headers to web metadata requests#3921
Open
wtg-mg8 wants to merge 1 commit into
Open
Conversation
Forward Options.Headers from Get-ChocolateyWebFile to Get-WebHeaders and Get-WebFileName so authenticated endpoints work during probing. Add a Pester regression test covering metadata and download requests. GPT5.6 generated, human reviewed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description Of Changes
Forward Options.Headers from Get-ChocolateyWebFile to Get-WebHeaders and Get-WebFileName so authenticated endpoints work during probing.
Add a Pester regression test covering metadata and download requests.
GPT5.6 generated, human reviewed.
Motivation and Context
See issue #3919 (Duplicate of #3191)
Testing
Tested locally by executing the powershell test directly, functionally testing that it works against our own endpoint and running the entire pester suite.
Tested using Powershell v3 and Powershell v5.
Operating Systems Testing
Tested on Windows 11.
Change Types Made
Change Checklist
Related Issue
Fixes #3191 (and duplicate that I originally raised: #3919)