From: haoyayoi Date: Tue, 9 May 2017 14:34:47 +0000 (+0900) Subject: add content-type in pubsubhubhub request header (#2943) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=2fba94b36eac65a368ec10f4c8c5808baa0179e7;p=mastodon.git add content-type in pubsubhubhub request header (#2943) * add content-type in pubsubhubhub request header * fix type --- 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?