From: Yuval Lifshitz Date: Mon, 5 Jul 2021 19:13:58 +0000 (+0300) Subject: rgw/http/notifications: support content type in HTTP POST messages X-Git-Tag: v17.1.0~1363^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F42189%2Fhead;p=ceph.git rgw/http/notifications: support content type in HTTP POST messages Fixes: https://tracker.ceph.com/issues/51530 Signed-off-by: Yuval Lifshitz --- diff --git a/src/rgw/rgw_pubsub_push.cc b/src/rgw/rgw_pubsub_push.cc index ca1b43b588d4..7aff6eb443b2 100644 --- a/src/rgw/rgw_pubsub_push.cc +++ b/src/rgw/rgw_pubsub_push.cc @@ -141,6 +141,7 @@ public: const auto post_data = json_format_pubsub_event(event); request.set_post_data(post_data); request.set_send_length(post_data.length()); + request.append_header("Content-Type", "application/json"); if (perfcounter) perfcounter->inc(l_rgw_pubsub_push_pending); const auto rc = RGWHTTP::process(&request, y); if (perfcounter) perfcounter->dec(l_rgw_pubsub_push_pending);