Skip to content

Commit

Permalink
rgw: fix multi-delete query param parsing.
Browse files Browse the repository at this point in the history
Multi-delete is triggered by a query parameter on POST, but there are
multiple valid ways of representing it, and Ceph should accept ANY way
that has the query parameter set, regardless of what value or absence of
value.

This caused the RubyGem aws-sdk-v1 to break, and has been present since
multi-delete was first added in commit 0a1f4a9, for the bobtail
release.

Fixes: http://tracker.ceph.com/issues/16618
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
(cherry picked from commit a7016e1)
  • Loading branch information
Robin H. Johnson committed Jul 7, 2016
1 parent bf73c9a commit 8655803
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rgw/rgw_rest.cc
Expand Up @@ -1473,7 +1473,7 @@ int RGWHandler_REST::read_permissions(RGWOp* op_obj)
case OP_POST:
case OP_COPY:
/* is it a 'multi-object delete' request? */
if (s->info.request_params == "delete") {
if (s->info.args.exists("delete")) {
only_bucket = true;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/rgw/rgw_rest_s3.cc
Expand Up @@ -2690,7 +2690,7 @@ RGWOp *RGWHandler_REST_Bucket_S3::op_delete()

RGWOp *RGWHandler_REST_Bucket_S3::op_post()
{
if ( s->info.request_params == "delete" ) {
if (s->info.args.exists("delete")) {
return new RGWDeleteMultiObj_ObjStore_S3;
}

Expand Down

0 comments on commit 8655803

Please sign in to comment.