Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Add support for the 'Range' header in Get-ChocolateyWebFile #1904

Open
Michael-Zp opened this issue Aug 22, 2019 · 0 comments
Open

Comments

@Michael-Zp
Copy link

Hi,

if the helper function Get-ChocolateyWebFile is called with an item "Range" in the options parameter an exception is thrown, because the range header is a restricted header (see: Remarks HttpWebRequest). It should use the HttpWebRequest.AddRange method (see: AddRange).

The method still works after the exception, but the header is not set properly and the whole file will be downloaded instead of only a part of it.

Greetings,
MichaelZp

Michael-Zp added a commit to Michael-Zp/choco that referenced this issue Aug 24, 2019
Adds support for the resticted Range Header in the
helper functions Get-WebHeaders and
Get-ChocolateyWebFile. Previously setting the
Range Header in the -Options would throw an
non stopping error and ignore the value.
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

No branches or pull requests

1 participant