From: Yehuda Sadeh Date: Tue, 29 Jan 2019 23:22:53 +0000 (-0800) Subject: rgw: es: query sent to elasticsearch needs content-type X-Git-Tag: v14.1.0~210^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8a5f3174fe8920a76a09fa4c6b379114f2574c2a;p=ceph.git rgw: es: query sent to elasticsearch needs content-type Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_sync_module_es_rest.cc b/src/rgw/rgw_sync_module_es_rest.cc index 204adb43adc0..8a8d895b3265 100644 --- a/src/rgw/rgw_sync_module_es_rest.cc +++ b/src/rgw/rgw_sync_module_es_rest.cc @@ -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, ¶ms, nullptr, out, &in); + map extra_headers = {{"Content-Type", "application/json"}}; + op_ret = conn->get_resource(resource, ¶ms, &extra_headers, out, &in); if (op_ret < 0) { ldout(s->cct, 0) << "ERROR: failed to fetch resource (r=" << resource << ", ret=" << op_ret << ")" << dendl; return;