Skip to content

Conversation

flcdrg
Copy link
Member

@flcdrg flcdrg commented Feb 12, 2024

Description Of Changes

Pass $options through to Get-WebFileName and Get-WebHeaders

  • For remaining headers that don't require special support, check that they aren't 'restricted' before adding them to the Headers collection.

Motivation and Context

Allows being able to set headers via functions like Install-ChocolateyPackage and ensure that those headers are used appropriately.

Testing

Operating Systems Testing

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #3191

@flcdrg flcdrg marked this pull request as ready for review June 10, 2024 08:53
@flcdrg flcdrg force-pushed the pass-options branch 2 times, most recently from e9e2702 to 03a0d6b Compare September 15, 2024 23:56
@flcdrg
Copy link
Member Author

flcdrg commented Sep 18, 2024

This may also possibly resolve chocolatey/chocolatey-licensed-issues#372

@pfremy
Copy link

pfremy commented Dec 16, 2024

I have use for that change too

Or any way to provide implicitely user credentials for some url, in the same principle as is done with "source"

@pauby
Copy link
Member

pauby commented May 12, 2025

@vexx32 can you confirm if this one is a duplicate of this one and close whichever one you need to? Can you add this to do under #3477 and do we still need it open?

@vexx32
Copy link
Member

vexx32 commented May 15, 2025

Yeah, I think the rewrite will be a good time to do that change as well.

Thanks for the contribution here @flcdrg! I do agree this is a change that is needed, but we are progressing through a total rewrite of many / all of these helper commands, so for the moment I don't think it makes sense to accept this contribution as it stands. I will make a note on #3477 to ensure the changes here are incorporated into the rewrite when these commands are rewritten in the coming months.

@vexx32 vexx32 closed this May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Get-ChocolateyWebFile should pass the Options parameter to Get-WebFileName and Get-WebHeaders

4 participants