Merge pull request #4451 from fantasticfears/webhooks-content-length

FIX: Content-Lenght should be the size in octets
This commit is contained in:
Guo Xiang Tan 2016-09-21 10:38:16 +08:00 committed by GitHub
commit ff5f20bd39

View file

@ -42,7 +42,7 @@ module Jobs
headers = { headers = {
'Accept' => '*/*', 'Accept' => '*/*',
'Connection' => 'close', 'Connection' => 'close',
'Content-Length' => body.size, 'Content-Length' => body.bytesize,
'Content-Type' => content_type, 'Content-Type' => content_type,
'Host' => uri.host, 'Host' => uri.host,
'User-Agent' => "Discourse/" + Discourse::VERSION::STRING, 'User-Agent' => "Discourse/" + Discourse::VERSION::STRING,