Skip to content

Commit

Permalink
rgw: es: query sent to elasticsearch needs content-type
Browse files Browse the repository at this point in the history
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa committed Jan 30, 2019
1 parent e37febd commit f823cc9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rgw/rgw_sync_module_es_rest.cc
Expand Up @@ -243,7 +243,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;
Expand Down

0 comments on commit f823cc9

Please sign in to comment.