verify if bucket exists in GetBucketLocationHandler (#6485)
This commit is contained in:
@@ -485,6 +485,13 @@ func (s3a *S3ApiServer) DeleteBucketLifecycleHandler(w http.ResponseWriter, r *h
|
|||||||
// GetBucketLocationHandler Get bucket location
|
// GetBucketLocationHandler Get bucket location
|
||||||
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
|
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
|
||||||
func (s3a *S3ApiServer) GetBucketLocationHandler(w http.ResponseWriter, r *http.Request) {
|
func (s3a *S3ApiServer) GetBucketLocationHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
bucket, _ := s3_constants.GetBucketAndObject(r)
|
||||||
|
|
||||||
|
if err := s3a.checkBucket(r, bucket); err != s3err.ErrNone {
|
||||||
|
s3err.WriteErrorResponse(w, r, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
writeSuccessResponseXML(w, r, CreateBucketConfiguration{})
|
writeSuccessResponseXML(w, r, CreateBucketConfiguration{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user