|
|
@ -653,15 +653,6 @@ func (api gatewayAPIHandlers) PutBucketHandler(w http.ResponseWriter, r *http.Re |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// validating region here, because isValidLocationConstraint
|
|
|
|
|
|
|
|
// reads body which has been read already. So only validating
|
|
|
|
|
|
|
|
// region here.
|
|
|
|
|
|
|
|
serverRegion := serverConfig.GetRegion() |
|
|
|
|
|
|
|
if serverRegion != "" && serverRegion != location { |
|
|
|
|
|
|
|
writeErrorResponse(w, ErrInvalidRegion, r.URL) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bucketLock := globalNSMutex.NewNSLock(bucket, "") |
|
|
|
bucketLock := globalNSMutex.NewNSLock(bucket, "") |
|
|
|
bucketLock.Lock() |
|
|
|
bucketLock.Lock() |
|
|
|
defer bucketLock.Unlock() |
|
|
|
defer bucketLock.Unlock() |
|
|
|