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

Get-WebFileName determines strange file name #727

Closed
mattia72 opened this issue May 6, 2016 · 3 comments
Closed

Get-WebFileName determines strange file name #727

mattia72 opened this issue May 6, 2016 · 3 comments

Comments

@mattia72
Copy link

mattia72 commented May 6, 2016

What You Are Seeing?

Strange file name is shown while downloading Neovim.zip
...
2016-05-06 21:11:24,326 [DEBUG] - Running 'Get-FileName' to determine name with url:'https://ci.appveyor.com/api/buildjobs/gd6s5h3o9dd6j04a/artifacts/build/Neovim.zip', defaultName:'neovimInstall.zip'
2016-05-06 21:11:26,379 [DEBUG] - File name determined from url is 'mFqJvUaGf5FpGcTDgzMWTLv0OZKoSvbUpKljlcOskeRLllHsQK3o1BKBMgRZ0GC+IhA1uUwrpAllgND8ZbZlQqw7mgGmYHClqQDhXmCm7CzSlE5UHa09dq30hJtOGfildDXu6nFrOi5xRstEW+UUM8RlhagD+EfPIW898CmHnjIQSB9QhNtXx0RT51WY08tHXc7OdaXLyA9ykpo4dQvRQ5jiMaY8JqtPOoFIFtuFMiSTm39JrEn09XkcZrEbeA4G37zwwu8sZSwPZUOLp6F3BpNm0zVthg1BtaqPyuxQd+qQDNG4DypzgynCECQPgyyqzW+AwjuVw=='

What is Expected?

The real file name of the downloaded file: Neovim.zip or the defaultName

How Did You Get This To Happen? (Steps to Reproduce)

choco install -fd neovim.nuspec

Output Log

https://gist.github.com/mattia72/e177ded83d61d5acfff01d4024303206

@ferventcoder
Copy link
Member

ferventcoder commented May 6, 2016

Expect this to be fixed soon.

@ferventcoder ferventcoder changed the title Get-FileName determines strange file name Get-WebFileName determines strange file name May 9, 2016
ferventcoder added a commit that referenced this issue May 9, 2016
Get-WebFileName returns a weird and incorrect file name when the
response url has parameters. Determine if the response url has
parameters prior to determining the file name. As a last resort, look
at the request url. If the request url has a filename at the end
(determined by whether it has an extension or not), then use it as long
as it doesn't contain a query as well.
ferventcoder added a commit that referenced this issue May 9, 2016
* stable:
  (doc) update CHANGELOG/nuspec
  (GH-728) Fix: Env var changes may require reboot
  (GH-729) Update env after setting env vars for scripts
  (GH-723) Warn when can't find file
  (GH-723) Convert msiexec to full path
  (GH-723) Ensure wusa.exe uses a full path
  (GH-727) Fix: Name is bad if response has params
@ferventcoder
Copy link
Member

This has been released in https://chocolatey.org/packages/chocolatey/0.9.10-beta-20160509

You can upgrade to it with choco upgrade chocolatey --version 0.9.10-beta-20160509 or after another hour or so you can use choco upgrade chocolatey -pre.

TheBigBear pushed a commit to TheBigBear/choco that referenced this issue May 14, 2016
Get-WebFileName returns a weird and incorrect file name when the
response url has parameters. Determine if the response url has
parameters prior to determining the file name. As a last resort, look
at the request url. If the request url has a filename at the end
(determined by whether it has an extension or not), then use it as long
as it doesn't contain a query as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants