]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: es: query sent to elasticsearch needs content-type
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 29 Jan 2019 23:22:53 +0000 (15:22 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Tue, 29 Jan 2019 23:33:01 +0000 (15:33 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync_module_es_rest.cc

index 204adb43adc05fdec4d0d67b906270d440955b32..8a8d895b3265041d419298d564124462b45d1815 100644 (file)
@@ -245,7 +245,8 @@ void RGWMetadataSearchOp::execute()
     params.push_back(param_pair_t("from", marker_str.c_str()));
   }
   ldout(s->cct, 20) << "sending request to elasticsearch, payload=" << string(in.c_str(), in.length()) << dendl;
-  op_ret = conn->get_resource(resource, &params, nullptr, out, &in);
+  map<string, string> extra_headers = {{"Content-Type", "application/json"}};
+  op_ret = conn->get_resource(resource, &params, &extra_headers, out, &in);
   if (op_ret < 0) {
     ldout(s->cct, 0) << "ERROR: failed to fetch resource (r=" << resource << ", ret=" << op_ret << ")" << dendl;
     return;