|
@ -98,8 +98,7 @@ func (s3a *S3ApiServer) CopyObjectHandler(w http.ResponseWriter, r *http.Request |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
glog.V(2).Infof("copy from %s to %s", srcUrl, dstUrl) |
|
|
glog.V(2).Infof("copy from %s to %s", srcUrl, dstUrl) |
|
|
destination := fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, dstBucket, dstObject) |
|
|
|
|
|
etag, errCode := s3a.putToFiler(r, dstUrl, resp.Body, destination) |
|
|
|
|
|
|
|
|
etag, errCode := s3a.putToFiler(r, dstUrl, resp.Body, "") |
|
|
|
|
|
|
|
|
if errCode != s3err.ErrNone { |
|
|
if errCode != s3err.ErrNone { |
|
|
s3err.WriteErrorResponse(w, r, errCode) |
|
|
s3err.WriteErrorResponse(w, r, errCode) |
|
@ -213,6 +212,11 @@ func processMetadata(reqHeader, existing http.Header, replaceMeta, replaceTaggin |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// content-encoding
|
|
|
|
|
|
if contentEncoding, ok := existing["Content-Encoding"]; ok { |
|
|
|
|
|
reqHeader["Content-Encoding"] = contentEncoding |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if !replaceMeta { |
|
|
if !replaceMeta { |
|
|
for header, _ := range reqHeader { |
|
|
for header, _ := range reqHeader { |
|
|
if strings.HasPrefix(header, s3_constants.AmzUserMetaPrefix) { |
|
|
if strings.HasPrefix(header, s3_constants.AmzUserMetaPrefix) { |
|
|