|
|
@ -69,9 +69,9 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request |
|
|
|
} |
|
|
|
|
|
|
|
dstUrl := fmt.Sprintf("http://%s%s/%s%s?collection=%s", |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, dstBucket, dstObject, dstBucket) |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, dstBucket, urlPathEscape(dstObject), dstBucket) |
|
|
|
srcUrl := fmt.Sprintf("http://%s%s/%s%s", |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, srcBucket, srcObject) |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, srcBucket, urlPathEscape(srcObject)) |
|
|
|
|
|
|
|
_, _, resp, err := util.DownloadFile(srcUrl, "") |
|
|
|
if err != nil { |
|
|
@ -154,7 +154,7 @@ func (s3a *S3ApiServer) CopyObjectPartHandler(w http.ResponseWriter, r *http.Req |
|
|
|
dstUrl := fmt.Sprintf("http://%s%s/%s/%04d.part?collection=%s", |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.genUploadsFolder(dstBucket), uploadID, partID, dstBucket) |
|
|
|
srcUrl := fmt.Sprintf("http://%s%s/%s%s", |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, srcBucket, srcObject) |
|
|
|
s3a.option.Filer.ToHttpAddress(), s3a.option.BucketsPath, srcBucket, urlPathEscape(srcObject)) |
|
|
|
|
|
|
|
dataReader, err := util.ReadUrlAsReaderCloser(srcUrl, rangeHeader) |
|
|
|
if err != nil { |
|
|
|