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

Support Nexus 3 urls for artifact downloads #285

Merged
merged 1 commit into from
Sep 20, 2017
Merged

Conversation

rvdh
Copy link
Contributor

@rvdh rvdh commented Jun 1, 2017

Nexus 3 no longer supports the old url format.

@rvdh
Copy link
Contributor Author

rvdh commented Aug 11, 2017

@alexjfisher @nanliu Can someone look at this PR? 😄

} else {
$c = ''
}
$artifact_url = sprintf('%s/repository/%s/%s/%s/%s/%s-%s%s.%s', $url,
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or a slash?

Copy link
Contributor Author

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.

@@ -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,
Copy link
Member

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'

Copy link
Member

@alexjfisher alexjfisher left a 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.

@alexjfisher
Copy link
Member

@rvdh Thanks for making that change. Could you rebase/squash down to a single commit?

Nexus 3 no longer supports the old url format.
@rvdh
Copy link
Contributor Author

rvdh commented Aug 14, 2017

@alexjfisher Ofcourse, done! Thanks for taking the time to review.

@zipkid
Copy link
Member

zipkid commented Sep 19, 2017

Hi,

Is there a reason this is not merged yet?

@zipkid zipkid merged commit affeb69 into voxpupuli:master Sep 20, 2017
@alexjfisher
Copy link
Member

@zipkid Thanks.

cegeka-jenkins pushed a commit to cegeka/puppet-archive that referenced this pull request Mar 26, 2021
Support Nexus 3 urls for artifact downloads
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

Successfully merging this pull request may close these issues.

3 participants