From f15a737a0abe8b747bf4070b776f9b91a9a3b18a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 6 Apr 2022 13:56:27 +0800 Subject: [PATCH] Add "Location:" in response when creating bucket according to "https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html" --- weed/s3api/s3api_bucket_handlers.go | 1 + 1 file changed, 1 insertion(+) diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go index b8f2c2f7a..7de1d5ebb 100644 --- a/weed/s3api/s3api_bucket_handlers.go +++ b/weed/s3api/s3api_bucket_handlers.go @@ -135,6 +135,7 @@ func (s3a *S3ApiServer) PutBucketHandler(w http.ResponseWriter, r *http.Request) s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) return } + w.Header().Set("Location", "/" + bucket) writeSuccessResponseEmpty(w, r) }