diff --git a/bucket.go b/bucket.go index eccd768..467fb92 100644 --- a/bucket.go +++ b/bucket.go @@ -102,5 +102,5 @@ func (s *BucketService) Head(ctx context.Context) (*Response, error) { type Bucket struct { Name string Region string `xml:"Location,omitempty"` - CreateDate string `xml:",omitempty"` + CreationDate string `xml:",omitempty"` } diff --git a/object.go b/object.go index 820c071..76ba3cb 100644 --- a/object.go +++ b/object.go @@ -126,7 +126,7 @@ func (s *ObjectService) Copy(ctx context.Context, name, sourceURL string, opt *O if opt.ObjectCopyHeaderOptions == nil { opt.ObjectCopyHeaderOptions = new(ObjectCopyHeaderOptions) } - opt.XCosCopySource = sourceURL + opt.XCosCopySource = encodeURIComponent(sourceURL) sendOpt := sendOptions{ baseURL: s.client.BaseURL.BucketURL, diff --git a/service_test.go b/service_test.go index 8e2ebe7..f45a57c 100644 --- a/service_test.go +++ b/service_test.go @@ -24,12 +24,12 @@ func TestServiceService_Get(t *testing.T) { huadong-1253846586 ap-shanghai - 2017-06-16T13:08:28Z + 2017-06-16T13:08:28Z huanan-1253846586 ap-guangzhou - 2017-06-10T09:00:07Z + 2017-06-10T09:00:07Z `) @@ -50,12 +50,12 @@ func TestServiceService_Get(t *testing.T) { { Name: "huadong-1253846586", Region: "ap-shanghai", - CreateDate: "2017-06-16T13:08:28Z", + CreationDate: "2017-06-16T13:08:28Z", }, { Name: "huanan-1253846586", Region: "ap-guangzhou", - CreateDate: "2017-06-10T09:00:07Z", + CreationDate: "2017-06-10T09:00:07Z", }, }, }