From 5dd405441e26d7eb3312021f149558e05b264c8e Mon Sep 17 00:00:00 2001 From: Yuval Lifshitz Date: Mon, 5 Jul 2021 22:13:58 +0300 Subject: [PATCH] rgw/http/notifications: support content type in HTTP POST messages Fixes: https://tracker.ceph.com/issues/51530 Signed-off-by: Yuval Lifshitz (cherry picked from commit 6a1688b57d1e329cecd0c26c494cb08c9a4c3079) --- src/rgw/rgw_pubsub_push.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_pubsub_push.cc b/src/rgw/rgw_pubsub_push.cc index ca1b43b588d4d..7aff6eb443b23 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); -- 2.39.5