From 2fba94b36eac65a368ec10f4c8c5808baa0179e7 Mon Sep 17 00:00:00 2001 From: haoyayoi Date: Tue, 9 May 2017 23:34:47 +0900 Subject: [PATCH] add content-type in pubsubhubhub request header (#2943) * add content-type in pubsubhubhub request header * fix type --- app/workers/pubsubhubbub/delivery_worker.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/workers/pubsubhubbub/delivery_worker.rb b/app/workers/pubsubhubbub/delivery_worker.rb index 511ae14b3..0e57a74b6 100644 --- a/app/workers/pubsubhubbub/delivery_worker.rb +++ b/app/workers/pubsubhubbub/delivery_worker.rb @@ -18,6 +18,7 @@ class Pubsubhubbub::DeliveryWorker return if DomainBlock.blocked?(host) headers['User-Agent'] = 'Mastodon/PubSubHubbub' + headers['Content-Type'] = 'application/atom+xml' headers['Link'] = LinkHeader.new([[api_push_url, [%w(rel hub)]], [account_url(subscription.account, format: :atom), [%w(rel self)]]]).to_s headers['X-Hub-Signature'] = signature(subscription.secret, payload) if subscription.secret?