-
Notifications
You must be signed in to change notification settings - Fork 905
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
Chocolatey doesn't always decompress downloads appropriately (support automatic decompression) #1056
Comments
I wonder if when it downloads it, it comes down as a zip ? |
Since this skips the verifier - can you provide a full output log (debug/verbose output)? Thanks! |
A link to a gist would be fine, or formatted here would also work. |
@ferventcoder The downloaded file is named Here is the log output. |
Ignoring the checksum issue for just a second, can it actually install? |
as a zip that is |
No, it won't install (since it is a zip and not a vsix) |
That seems to be a much bigger issue than just failing the checksum. |
@ferventcoder Any info I can provide additionally to help? |
https://devexpress.gallerycdn.vsassets.io - perhaps they are looking at the user agent and giving out a zip instead of a vsix? Are you seeing this same issue with visx files coming from the Microsoft gallery? |
This is actually the Microsoft gallery (they switched recently to the Visual Studio Marketplace). Or did you mean with the old URL? |
Ah! I saw devexpress there and thought it was something else. I did mean the old URLs. |
Mmh, installing https://chocolatey.org/packages/coderush-vs2015/16.1.8, which uses the visualstudiogallery.msdn.microsoft.com URL, seems to work. |
Perhaps we can talk to those folks to see what can be done. |
Sure, I'll contact them about this |
@ferventcoder @pascalberger from what I could gather it looks like choco doesn't handle gzip encoding correctly. first time I've seen this happen though. |
So this is maybe an issue with choco then. |
it's just a possibility, I'm not entirely sure. |
found it Perhaps allowing a parameter to set the decompression method? (GZip, deflate or none) |
If the response header has GZip, it seems like it would make sense to set it then. Thoughts? |
true, it would make sense for that.
I'm just guessing this would happen after parsing the content-encoding header. |
@AdmiringWorm We already create multiple requests. 👍 |
ah yes, I see that now. the auto detection won't solve this issue entirely. |
@AdmiringWorm Where can I set this as the maintainer? I'm actually using the |
@pascalberger to set the the accept-encoding or any other headers you can use the options parameter: $parameters = @{
# Other parameters here
Options = @{
Headers = @{
'Accept-Encoding' = 'gzip'
'User-Agent' = 'whatever you want'
# Other headers, except Connection
}
}
} However this won't solve anything yet, not until the downloader is able to decompress a gzipped stream |
Just a small update from me regarding this, $req.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate That is what I had added to try installing packages from the marketplace (which then worked), I can open a PR for it if you're interested. /cc @ferventcoder |
@ferventcoder @AdmiringWorm Any update on this? |
I would entertain a PR that allows adding this setting. I would be a bit
concerned on this chamge for wholesale of downloading things. At least at
this stage, maybe it would do no harm overall.
On Tue, Feb 7, 2017 at 08:12 Pascal Berger ***@***.***> wrote:
@ferventcoder <https://github.com/ferventcoder> @AdmiringWorm
<https://github.com/AdmiringWorm> Any update on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1056 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD4DiDOHv3skK3KNq9IXq7GNMzBrZ0qks5raHuwgaJpZM4K1XyA>
.
--
Rob
"Be passionate in all you do"
http://codebetter.com/robreynolds
http://ferventcoder.com
https://twitter.com/ferventcoder
|
@AdmiringWorm Interested in doing the PR? Otherwise I can also give it a try. |
@pascalberger Feel free to give it a try if you want. |
When grabbing web headers and the remote file name, also support automatic decompression to match what is done for Get-WebFile.
This will be in 0.10.4 |
What You Are Seeing?
Vsix file downloaded using
Install-ChocolateyVsixPackage
is zipped, which results in checksum validation error.What is Expected?
File should be downloaded as Vsix, without being packed in a Zip file.
How Did You Get This To Happen? (Steps to Reproduce)
Try installing this package.
Source code here
The text was updated successfully, but these errors were encountered: