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
S3-links region independency #58148
S3-links region independency #58148
Conversation
This is an automated comment for commit 50724f1 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
@@ -574,6 +574,9 @@ Client::doRequest(RequestType & request, RequestFn request_fn) const | |||
if (!new_uri) | |||
return result; | |||
|
|||
if (initial_endpoint.substr(11) == "amazonaws.com") // Check if user didn't mention any region |
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.
What is 11 symbol prefix?
Maybe it's better to use
inline bool endsWith(const std::string & s, const char * suffix) |
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.
I think endsWith()
will not be the best option because we should always have amazonaws.com
at the end of the endpoint. We should check that we have only the clear endpoint like: https://s3.amazonaws.com
, but not like this: https://s3.eu-north-1.amazonaws.com
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
This PR allows users to use s3 links (
https://
ands3://
) without mentioning region if it's not default. Also find the correct region if the user mentioned the wrong one.Documentation entry for user-facing changes