Skip to content

Commit

Permalink
(GH-1056) Support auto decompression for Headers
Browse files Browse the repository at this point in the history
When grabbing web headers and the remote file name, also support
automatic decompression to match what is done for Get-WebFile.
  • Loading branch information
ferventcoder committed Mar 9, 2017
1 parent a3173f1 commit 01af07d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ param(
$request.AllowAutoRedirect = $true
$request.MaximumAutomaticRedirections = 20
#$request.KeepAlive = $true
$request.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate
$request.Timeout = 30000
if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
$request.Timeout = $env:chocolateyRequestTimeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ param(
$request.AllowAutoRedirect = $true
$request.MaximumAutomaticRedirections = 20
#$request.KeepAlive = $true
$request.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate
$request.Timeout = 30000
if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
$request.Timeout = $env:chocolateyRequestTimeout
Expand Down

0 comments on commit 01af07d

Please sign in to comment.