I tried again with specify metadata in PUT Object Copy. As a result source metadata is remaining.
$ ./s3curl.pl --id test -- http://localhost:8080/test-directive/ -X PUT $ ./s3curl.pl --id test -- http://localhost:8080/test-directive/src -X PUT -T testFile -s -H 'x-amz-meta-src: src' $ ./s3curl.pl --id test -- http://localhost:8080/test-directive/src -X HEAD -I HTTP/1.1 200 OK Content-Length: 11 x-amz-id-2: txb51acb733b634611b298b-0055128ab0 Last-Modified: Wed, 25 Mar 2015 10:14:23 GMT ETag: "7c12772809c1c0c3deda6103b10fdfa0" x-amz-meta-src: src x-amz-request-id: txb51acb733b634611b298b-0055128ab0 Content-Type: application/octet-stream X-Trans-Id: txb51acb733b634611b298b-0055128ab0 Date: Wed, 25 Mar 2015 10:15:12 GMT
$ ./s3curl.pl --id test -- http://localhost:8080/test-directive/dst -X PUT -H 'x-amz-copy-source:/test-directive/src' -H 'x-amz-meta-dst: dst' -H 'x-amz-metadata-directive: REPLACE' <?xml version='1.0' encoding='UTF-8'?> <CopyObjectResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <LastModified>2015-03-25T10:16:25.000Z</LastModified> <ETag>"7c12772809c1c0c3deda6103b10fdfa0"</ETag> </CopyObjectResult>
$ ./s3curl.pl --id test -- http://localhost:8080/test-directive/dst -X HEAD -I HTTP/1.1 200 OK Content-Length: 11 x-amz-id-2: txf2147110b4d94edcaa3d1-0055128b0c x-amz-meta-dst: dst Last-Modified: Wed, 25 Mar 2015 10:16:25 GMT ETag: "7c12772809c1c0c3deda6103b10fdfa0" x-amz-meta-src: src x-amz-request-id: txf2147110b4d94edcaa3d1-0055128b0c Content-Type: application/octet-stream X-Trans-Id: txf2147110b4d94edcaa3d1-0055128b0c Date: Wed, 25 Mar 2015 10:16:45 GMT
I tried again with specify metadata in PUT Object Copy.
As a result source metadata is remaining.
$ ./s3curl.pl --id test -- http:// localhost: 8080/test- directive/ -X PUT localhost: 8080/test- directive/ src -X PUT -T testFile -s -H 'x-amz-meta-src: src' localhost: 8080/test- directive/ src -X HEAD -I 611b298b- 0055128ab0 c3deda6103b10fd fa0" 611b298b- 0055128ab0 octet-stream 611b298b- 0055128ab0
$ ./s3curl.pl --id test -- http://
$ ./s3curl.pl --id test -- http://
HTTP/1.1 200 OK
Content-Length: 11
x-amz-id-2: txb51acb733b634
Last-Modified: Wed, 25 Mar 2015 10:14:23 GMT
ETag: "7c12772809c1c0
x-amz-meta-src: src
x-amz-request-id: txb51acb733b634
Content-Type: application/
X-Trans-Id: txb51acb733b634
Date: Wed, 25 Mar 2015 10:15:12 GMT
$ ./s3curl.pl --id test -- http:// localhost: 8080/test- directive/ dst -X PUT -H 'x-amz- copy-source: /test-directive /src' -H 'x-amz-meta-dst: dst' -H 'x-amz- metadata- directive: REPLACE' s3.amazonaws. com/doc/ 2006-03- 01/"> >2015-03- 25T10:16: 25.000Z< /LastModified> "7c12772809c1c0 c3deda6103b10fd fa0"</ETag>
<?xml version='1.0' encoding='UTF-8'?>
<CopyObjectResult xmlns="http://
<LastModified
<ETag>
</CopyObjectResult>
$ ./s3curl.pl --id test -- http:// localhost: 8080/test- directive/ dst -X HEAD -I edcaa3d1- 0055128b0c c3deda6103b10fd fa0" edcaa3d1- 0055128b0c octet-stream edcaa3d1- 0055128b0c
HTTP/1.1 200 OK
Content-Length: 11
x-amz-id-2: txf2147110b4d94
x-amz-meta-dst: dst
Last-Modified: Wed, 25 Mar 2015 10:16:25 GMT
ETag: "7c12772809c1c0
x-amz-meta-src: src
x-amz-request-id: txf2147110b4d94
Content-Type: application/
X-Trans-Id: txf2147110b4d94
Date: Wed, 25 Mar 2015 10:16:45 GMT