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

makeBucket should use the requested region for signing #675

Merged

Conversation

krishnasrinivas
Copy link
Contributor

No description provided.

@@ -538,13 +538,14 @@ export class Client {
var headers = {}
// virtual-host-style request but signed with region 'us-east-1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this comment valid?

if (e && e.name === 'AuthorizationHeaderMalformed') {
if (!region) region = 'us-east-1'
this.makeRequest({method, bucketName, headers}, payload, 200, region, false, (e) => {
if (e && e.code === 'AuthorizationHeaderMalformed') {
// if the bucket already exists in non-standard location we try again
Copy link
Contributor

@kannappanr kannappanr Mar 6, 2018

Choose a reason for hiding this comment

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

Should this comment also be updated?

Remove AuthorizationHeaderMalformed fallback as S3 returns the right error
@krishnasrinivas krishnasrinivas force-pushed the makebucket-sign-region branch from bbb5bc7 to 42578f8 Compare March 7, 2018 20:42
Copy link
Contributor

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

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

LGTM

@krishnasrinivas krishnasrinivas merged commit a1be46d into minio:master Mar 8, 2018
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