]> cat aescling's git repositories - mastodon.git/commitdiff
add content-type in pubsubhubhub request header (#2943)
authorhaoyayoi <st.hao.yayoi@gmail.com>
Tue, 9 May 2017 14:34:47 +0000 (23:34 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Tue, 9 May 2017 14:34:47 +0000 (16:34 +0200)
* add content-type in pubsubhubhub request header

* fix type

app/workers/pubsubhubbub/delivery_worker.rb

index 511ae14b3f7992fd01d96238f8244893a18513d9..0e57a74b6cb354f377c47d41890f0468265cd282 100644 (file)
@@ -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?