]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RGWSendRESTResourceCR keeps encoded bufferlist instead of object
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 30 Jan 2019 00:58:38 +0000 (16:58 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 30 Jan 2019 01:15:15 +0000 (17:15 -0800)
Needed for feature backport, could not be applied cleanly from
later version.

Object might be abstract.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_cr_rest.h

index 08303b8d0a9f7dfc2c383ba6658bc6aa64df3ecc..c6ea88217d9754cc4b0a6f45cc551146335dd341 100644 (file)
@@ -90,7 +90,7 @@ class RGWSendRESTResourceCR : public RGWSimpleCoroutine {
   param_vec_t headers;
   T *result;
   E *err_result;
-  S input;
+  bufferlist input_bl;
 
   boost::intrusive_ptr<RGWRESTSendResource> http_op;
 
@@ -121,14 +121,7 @@ public:
 
     op->set_user_info((void *)stack);
 
-    JSONFormatter jf;
-    encode_json("data", input, &jf);
-    std::stringstream ss;
-    jf.flush(ss);
-    bufferlist bl;
-    bl.append(ss.str());
-
-    int ret = op->aio_send(bl);
+    int ret = op->aio_send(input_bl);
     if (ret < 0) {
       lsubdout(cct, rgw, 0) << "ERROR: failed to send request" << dendl;
       op->put();