Comment 2 for bug 1433875

Revision history for this message
Masaki Tsukuda (tsukuda-masaki) wrote :

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