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
rgw: fix 'copy part' without 'x-amz-copy-source-range' #20002
Conversation
@malc0lm I think this should have a test case in s3tests; is that something you could provide? |
@mattbenjamin did you mean I need another pr which test copypart for ceph/s3-tests? |
@mattbenjamin I had finished test case for copy part without "x-amz-copy-source-range", should I put a pr to ceph/s3-tests? |
Yes, please 😀
…On Jan 24, 2018 12:48 AM, "Ang Lee" ***@***.***> wrote:
@mattbenjamin <https://github.com/mattbenjamin> I had finished test case
for copy part without "x-amz-copy-source-range", should I put a pr to
ceph/s3-tests?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20002 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AASY5xqEt2Dk5LQ31T0sLOnxxzngBz0hks5tNsQygaJpZM4Riq93>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, I'll run provided tests today
@malc0lm this needs a rebase--if you have time, could you send? |
src/rgw/rgw_rest_s3.cc
Outdated
@@ -3275,7 +3275,7 @@ int RGWHandler_REST_S3::init(RGWRados *store, struct req_state *s, | |||
|
|||
const char *copy_source = s->info.env->get("HTTP_X_AMZ_COPY_SOURCE"); | |||
|
|||
if (copy_source && !s->info.env->get("HTTP_X_AMZ_COPY_SOURCE_RANGE")) { | |||
if (copy_source && !s->info.env->get("HTTP_X_AMZ_COPY_SOURCE_RANGE") && !s->info.args.exists("uploadId")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would format this as (long line, reading clarity):
if (copy_source &&
(! s->info.env->get("HTTP_X_AMZ_COPY_SOURCE_RANGE")) &&
(! s->info.args.exists("uploadId"))) {
mergewise, rgw_op.cc:3381 needs something like |
it will copy an entire source object Signed-off-by: Malcolm Lee <fengxueyu35@126.com>
@mattbenjamin thanks for your reviewing and mergewise. I had rebased and updated commit, and will pulpito's fail be fixed automatically? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@malc0lm had trouble testing this today due to an awsv4 signature failure not caused by this (of course); I am working with ali to run a boto3 version--will try to finish up tomorrow! |
@mattbenjamin ok. thanks :) |
@malc0lm tests re-run with a fixed version of the boto3 s3-tests--will comment on that PR |
http://tracker.ceph.com/issues/22729
Copying part without http header "x-amz-copy-source-range" will be mistaken for copying object.