]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
fixup! rgw: RGWSetRequestPayment request should be forwarded to master zone 28714/head
authorChang Liu <liuchang0812@gmail.com>
Fri, 14 Jun 2019 06:42:45 +0000 (14:42 +0800)
committerNathan Cutler <ncutler@suse.com>
Mon, 24 Jun 2019 10:11:15 +0000 (12:11 +0200)
Signed-off-by: Chang Liu <liuchang0812@gmail.com>
(cherry picked from commit 73370efca197b13bf9888983546542ad2d61ee31)

Conflicts:
src/rgw/rgw_rest_s3.cc
- nautilus uses "ldout" where master has "ldpp_dout", but this is irrelevant here

src/rgw/rgw_rest_s3.cc

index 1be0253e9b752b96e07a687ca1d5ebdcb8c70168..c34ac89be88a2cd19750e8a24c0d3e674775fe23 100644 (file)
@@ -2591,14 +2591,12 @@ int RGWSetRequestPayment_ObjStore_S3::get_params()
   const auto max_size = s->cct->_conf->rgw_max_put_param_size;
 
   int r = 0;
-  bufferlist data;
-  std::tie(r, data) = rgw_rest_read_all_input(s, max_size, false);
+  std::tie(r, in_data) = rgw_rest_read_all_input(s, max_size, false);
 
   if (r < 0) {
     return r;
   }
 
-  in_data.append(data);
 
   RGWSetRequestPaymentParser parser;
 
@@ -2607,8 +2605,8 @@ int RGWSetRequestPayment_ObjStore_S3::get_params()
     return -EIO;
   }
 
-  char* buf = data.c_str();
-  if (!parser.parse(buf, data.length(), 1)) {
+  char* buf = in_data.c_str();
+  if (!parser.parse(buf, in_data.length(), 1)) {
     ldout(s->cct, 10) << "failed to parse data: " << buf << dendl;
     return -EINVAL;
   }