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

URI with space causes artifact error #65

Open
snowman78 opened this issue Jun 27, 2016 · 0 comments
Open

URI with space causes artifact error #65

snowman78 opened this issue Jun 27, 2016 · 0 comments

Comments

@snowman78
Copy link

snowman78 commented Jun 27, 2016

URI::InvalidURIError: bad URI(is not URI?): http://artifactory.8081/artifactory/api/storage/bin-release-local/com/prod/IP/2016.02/PROD IP-2016.02.msi

version 2.3.2

The download_uri from artifactory is not encoded so the client request fails.

Local fix artifactory/resources/artifact.rb
`
client.get('/api/search/artifact', params)['results'].map do |artifact|

--- from_url(artifact['uri'], client: client)

+++ from_url(URI.encode(artifact['uri']), client: client)

end
`

snowman78 added a commit to snowman78/artifactory-client that referenced this issue Jun 28, 2016
snowman78 added a commit to snowman78/artifactory-client that referenced this issue Jun 28, 2016
bergholdt pushed a commit to bergholdt/artifactory-client that referenced this issue Jan 8, 2017
bergholdt pushed a commit to bergholdt/artifactory-client that referenced this issue Jan 8, 2017
Artifactory does not escape artifact uri return from search, so if artifacts has been uploaded with space in name we must escape before calling client.get.
Also make sure we do not escape already escaped URIs

Signed-off-by: Rasmus Bergholdt <rasmus.bergholdt@gmail.com>
Issue chef#65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant