Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PUT Copy shows target key when source is not found [JIRA: RCS-215] #1169

Closed
shino opened this issue Jun 18, 2015 · 6 comments
Closed

PUT Copy shows target key when source is not found [JIRA: RCS-215] #1169

shino opened this issue Jun 18, 2015 · 6 comments

Comments

@shino
Copy link
Contributor

shino commented Jun 18, 2015

Expected (result to AWS S3)

% s3curl.pl --id s3 -- -X PUT -H 'Content-Length: 0' \
    -H 'x-amz-copy-source: shino.shun.test1/aaa' -s \
    http://shino.shun.test1.s3.amazonaws.com/bbb X
<?xml version="1.0"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Key>aaa</Key>
  <RequestId>74EE50EC9996EA4F</RequestId>
  <HostId>ilJOTHXjPIQRLheqg0495U+5r3nEbOy/xb80FQTAE6A7TG8FG6wbx50KjwLDZsRHLb6EKpfCeoU=</HostId>
</Error>

CS (at commit 5f6caea)

% s3curl.pl --id cs -- -X PUT -H 'Content-Length: 0' \
     -H 'x-amz-copy-source: test/aaa' -s -x 127.0.0.1:15018 \
     http://test.s3.amazonaws.com/bbb X
<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>NoSuchKey</Code>
  <Message>The specified key does not exist.</Message>
  <Resource>/test/bbb</Resource>
  <RequestId/>
</Error>
@shino shino added the Bug label Jun 18, 2015
@Basho-JIRA Basho-JIRA changed the title PUT Copy shows target key when source is not found PUT Copy shows target key when source is not found [JIRA: RCS-215] Jun 18, 2015
@shino
Copy link
Contributor Author

shino commented Jun 18, 2015

Other samples of AWS S3 responses.

Non existent source bucket:

% s3curl.pl --id shino -- -X PUT -H 'Content-Length: 0' \
    -H 'x-amz-copy-source: shino.shun.test2/aaa' -s \
    http://shino.shun.test1.s3.amazonaws.com/bbb X
<?xml version="1.0"?>
<Error>
  <Code>NoSuchBucket</Code>
  <Message>The specified bucket does not exist</Message>
  <BucketName>shino.shun.test2</BucketName>
  <RequestId>FAAB2420E07E1C49</RequestId>
  <HostId>Tq3IWK9nM7uz1+E1MbWRppg/hIKr4USPakZCd7UVLgw3mRIArzlIalJEmdTDxGuK9eHV6z6ZgYE=</HostId>
</Error>

Non existent target bucket:

% s3curl.pl --id shino -- -X PUT -H 'Content-Length: 0' \
     -H 'x-amz-copy-source: shino.shun.test1/aaa' -s \
     http://shino.shun.test-target.s3.amazonaws.com/bbb X
<?xml version="1.0"?>
<Error>
  <Code>NoSuchBucket</Code>
  <Message>The specified bucket does not exist</Message>
  <BucketName>shino.shun.test-target</BucketName>
  <RequestId>E655030FD29BD3AE</RequestId>
  <HostId>lVFOgbtXYy2K68HOkfCJiCfntQ892rj+1mFiHERaj+Jp2cS9E1+oD4QX2HghwD4J</HostId>
</Error>

@kuenishi
Copy link
Contributor

Any bad consequent behaviour on specific client library or tools?

@shino
Copy link
Contributor Author

shino commented Jun 22, 2015

AFAIK, no. It just fooled me when I was writing riak_test 😅

@shino
Copy link
Contributor Author

shino commented Jul 28, 2015

#1200 will address wrong resource value. This issue will be closed after it is merged. More compatibility with S3 XML structure will be another issue, if it is actually an issue.

@shino shino added this to the 2.1.0 milestone Jul 28, 2015
@Basho-JIRA
Copy link

For release note:

Before this fix, error response of PUT Copy API call shows target resource path when source is not found or not accessible by the request user. After this fix, it shows source path appropriately.

_[posted via JIRA by Shunichi Shinohara]_

@shino
Copy link
Contributor Author

shino commented Jul 30, 2015

Addressed by #1200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants