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

fix(lib-storage): fix bucket duplication in hostname #4157

Merged
merged 1 commit into from
Nov 9, 2022
Merged

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Nov 9, 2022

Issue

#4109

Description

endpoints rulesets can resolve with the bucket already prefixed in the hostname, but custom endpoints might not include it. Therefore this PR proposes that we check for the bucket prefix when constructing an upload Location.

This is a best-guess heuristic. If someone has an identical hostname and bucket like hostname abcd.com and a bucket of abcd, it will not append the bucket name to create abcd.abcd.com/key. In such cases the user will have to specify a hostname including the bucket name.

Testing

added unit tests

@kuhe kuhe requested a review from a team as a code owner November 9, 2022 03:35
@kuhe kuhe merged commit 004d6c0 into aws:main Nov 9, 2022
@kuhe kuhe deleted the fix/upload branch November 9, 2022 14:04
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants