-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Support Nexus 3 urls for artifact downloads #285
Conversation
@alexjfisher @nanliu Can someone look at this PR? 😄 |
} else { | ||
$c = '' | ||
} | ||
$artifact_url = sprintf('%s/repository/%s/%s/%s/%s/%s-%s%s.%s', $url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can any of the parameters, (artifact_id, version etc), contain characters that would need escaping when building a URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can (but shouldn't). It would be very unusual to have, say, a space in one of the parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or a slash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A slash should never be in any of the parameters. Either way, if there is a slash and it's escaped you'd get a 404 and if it's not escaped, you'd also get a 404.
But if you're being silly and you specify the group_id with slashes (nl/avisi/foo instead of nl.avisi.foo) - escaping the slash will actually break the url.
manifests/nexus.pp
Outdated
@@ -43,6 +43,7 @@ | |||
Optional[String] $proxy_server = undef, | |||
Optional[String] $proxy_type = undef, | |||
Optional[Boolean] $allow_insecure = undef, | |||
Optional[Boolean] $use_nexus3_urls = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for 'Optional' here as you're not defaulting to 'undef'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the minor issue with the type, LGTM.
@rvdh Thanks for making that change. Could you rebase/squash down to a single commit? |
Nexus 3 no longer supports the old url format.
@alexjfisher Ofcourse, done! Thanks for taking the time to review. |
Hi, Is there a reason this is not merged yet? |
@zipkid Thanks. |
Support Nexus 3 urls for artifact downloads
Nexus 3 no longer supports the old url format.