diff options
| author | Tom Crasset <25140344+tcrasset@users.noreply.github.com> | 2025-01-29 17:55:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-29 08:55:08 -0800 |
| commit | 551baa44b2f0884187a582f740ace515214ea34e (patch) | |
| tree | 06518603a9df746ee15fc3dab22d9aa68a8ed93c /weed/s3api/s3api_bucket_handlers.go | |
| parent | 9f42ce3f01468317870c0c37f3a0ebf986a504f9 (diff) | |
| download | seaweedfs-551baa44b2f0884187a582f740ace515214ea34e.tar.xz seaweedfs-551baa44b2f0884187a582f740ace515214ea34e.zip | |
verify if bucket exists in GetBucketLocationHandler (#6485)
Diffstat (limited to 'weed/s3api/s3api_bucket_handlers.go')
| -rw-r--r-- | weed/s3api/s3api_bucket_handlers.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index 7d0d76ea4..2f535d0d0 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -485,6 +485,13 @@ func (s3a *S3ApiServer) DeleteBucketLifecycleHandler(w http.ResponseWriter, r *h // GetBucketLocationHandler Get bucket location // https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html 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{}) } |
