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

Wrong filename from a custom url #307

Open
fluxX04 opened this issue Feb 21, 2020 · 1 comment
Open

Wrong filename from a custom url #307

fluxX04 opened this issue Feb 21, 2020 · 1 comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.

Comments

@fluxX04
Copy link

fluxX04 commented Feb 21, 2020

Version:

Using version ~> 3.11 from chef_client_updater v3.8.4

Environment:

Windows 10

Scenario:

I'm using the cookbook attribute download_url_override as url: https://my.cloud/index.php/s/8yo7sEwDoJf32TN/download?path=chef-client&files=chef-client-latest-x64.msi - to download the chef-client.

Steps to Reproduce:

Use a download url like above.

Expected Result:

Save and download the file with the correct filename and complete the chef upgrade.

Actual Result:

The filename gets resolved to Filename: download?path=chef-client&files=chef-client-latest-x64.msi and cannot be downloaded because of illegal chars in the path:

Downloading chef from https://my.cloud/index.php/s/8yo7sEwDoJf32TN/download?path=chef-client&files=chef-client-latest-x64.msi to C:\Users\myuser\AppData\Local\Temp\download?path=chef-client&files=chef-client-latest-x64.msi.

Filename should be: chef-client-latest-x64.msi

Code:

PS:

$download_url = "https://my.cloud/index.php/s/8yo7sEwDoJf32TN/download?path=chef-client&files=chef-client-latest-x64.msi"
PS C:\opscode> ($download_url -split '/')[-1]
download?path=chef-client&files=chef-client-latest-x64.msi

Greetz

@fluxX04 fluxX04 added Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected. labels Feb 21, 2020
This was referenced Aug 20, 2020
@fluxX04
Copy link
Author

fluxX04 commented Jan 5, 2021

@tas50 @schisamo some progress here?

Greetz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Untriaged An issue that has yet to be triaged. Type: Bug Does not work as expected.
Projects
None yet
Development

No branches or pull requests

1 participant