Skip to content

Commit

Permalink
(#2374) Remove setting of Authorization property
Browse files Browse the repository at this point in the history
This property does not actually exist on the HttpWebRequest object:

https://docs.microsoft.com/en-us/dotnet/api/system.net.httpwebrequest?view=netframework-4.0#properties

As such, it can't be used. Based on testing that was completed, the
Authorization header was correctly being set in v0.10.15 of Chocolatey,
and no work was required to be done here.

This commit, essentially puts this file back to how it was in v0.10.15.
  • Loading branch information
gep13 committed Sep 21, 2021
1 parent dff98d0 commit 05ff7c3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/chocolatey.resources/helpers/functions/Get-WebFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ param(
'Cookie' {$req.CookieContainer.SetCookies($uri, $options.headers.$key)}
'Referer' {$req.Referer = $options.headers.$key}
'User-Agent' {$req.UserAgent = $options.headers.$key}
'Authorization' {$req.Authorization = $options.headers.$key}
Default {$req.Headers.Add($key, $options.headers.$key)}
}
}
Expand Down

0 comments on commit 05ff7c3

Please sign in to comment.