From 707fcb9434d0d9381cca97586b658449f885d341 Mon Sep 17 00:00:00 2001 From: Erick Guan Date: Wed, 21 Sep 2016 10:31:20 +0800 Subject: [PATCH] FIX: Content-Lenght should be the size in octets --- app/jobs/regular/emit_web_hook_event.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/regular/emit_web_hook_event.rb b/app/jobs/regular/emit_web_hook_event.rb index c3bbc3c14ae..87e273376f4 100644 --- a/app/jobs/regular/emit_web_hook_event.rb +++ b/app/jobs/regular/emit_web_hook_event.rb @@ -42,7 +42,7 @@ module Jobs headers = { 'Accept' => '*/*', 'Connection' => 'close', - 'Content-Length' => body.size, + 'Content-Length' => body.bytesize, 'Content-Type' => content_type, 'Host' => uri.host, 'User-Agent' => "Discourse/" + Discourse::VERSION::STRING,