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

Add "location" query method to bucket #439

Closed
fishcharlie opened this issue Apr 13, 2019 · 2 comments · Fixed by #441
Closed

Add "location" query method to bucket #439

fishcharlie opened this issue Apr 13, 2019 · 2 comments · Fixed by #441

Comments

@fishcharlie
Copy link
Contributor

It looks like the get bucket route is prepared to handle location in the future.

s3rver/lib/routes.js

Lines 71 to 101 in de7c5a3

.get("/:bucket", bucketCtrl.bucketExists, ctx => {
switch (ctx.params.queryMethod) {
case undefined:
return bucketCtrl.getBucket(ctx);
case "cors":
return bucketCtrl.getBucketCors(ctx);
case "website":
return bucketCtrl.getBucketWebsite(ctx);
case "acl":
case "analytics":
case "encryption":
case "inventory":
case "lifecycle":
case "location":
case "logging":
case "metrics":
case "notification":
case "object-lock":
case "policyStatus":
case "publicAccessBlock":
case "replication":
case "requestPayment":
case "tagging":
case "uploads":
case "versioning":
ctx.throw(501);
break;
default:
ctx.state.methodIsNotAllowed = true;
}
})

But in the bucket methods location isn't listed.

exports.METHODS = [
"acl",
"analytics",
"cors",
"delete",
"encryption",
"inventory",
"lifecycle",
"metrics",
"notification",
"object-lock",
"policy",
"policyStatus",
"publicAccessBlock",
"replication",
"requestPayment",
"tagging",
"uploads",
"versions",
"website"
];

Is there a reason for this? It seems like a bug to me, but not 100% sure.

@kherock
Copy link
Collaborator

kherock commented Apr 14, 2019

Yeah that looks like a very minor bug (S3rver would report MethodNotAllowed instead of NotImplemented). Did you have a use for location?

@fishcharlie
Copy link
Contributor Author

@kherock No use for it. Just trying to understand the code base and make sure I'm understanding it correctly.

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 a pull request may close this issue.

2 participants