]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/http/notifications: support content type in HTTP POST messages 42644/head
authorYuval Lifshitz <ylifshit@redhat.com>
Mon, 5 Jul 2021 19:13:58 +0000 (22:13 +0300)
committerCory Snyder <csnyder@iland.com>
Wed, 4 Aug 2021 15:16:06 +0000 (11:16 -0400)
Fixes: https://tracker.ceph.com/issues/51530
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 6a1688b57d1e329cecd0c26c494cb08c9a4c3079)

src/rgw/rgw_pubsub_push.cc

index ca1b43b588d4d1cb70fc5296235ab02ca1744892..7aff6eb443b230f0123031f9a992884afa389872 100644 (file)
@@ -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);