]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix multi-delete query param parsing. 10187/head
authorRobin H. Johnson <robin.johnson@dreamhost.com>
Thu, 7 Jul 2016 21:14:36 +0000 (14:14 -0700)
committerRobin H. Johnson <robin.johnson@dreamhost.com>
Thu, 7 Jul 2016 21:19:16 +0000 (14:19 -0700)
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 0a1f4a97da, for the bobtail
release.

Fixes: http://tracker.ceph.com/issues/16618
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
src/rgw/rgw_rest.cc
src/rgw/rgw_rest_s3.cc

index 655bbd290e59e7ed9cdda698cd147810db4a51b1..e485d99f40ce883370520d3643390dc1efef1e34 100644 (file)
@@ -1548,7 +1548,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;
     }
index 23267199c78bdf0b0da6f61cd8cffc4121b7a65d..5acba5e08255b75cc81bbcdf32b21a42b623f9c3 100644 (file)
@@ -2866,7 +2866,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;
   }