From f3744914ae1eb481d6dbd428b26757f161eafc6d Mon Sep 17 00:00:00 2001 From: Tank Tang Date: Mon, 24 Feb 2020 23:05:20 +0800 Subject: [PATCH] #66 For Passenger MethodMissing. --- lib/azure/core/http/http_request.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/azure/core/http/http_request.rb b/lib/azure/core/http/http_request.rb index 5fdd38e..9bf9dde 100755 --- a/lib/azure/core/http/http_request.rb +++ b/lib/azure/core/http/http_request.rb @@ -185,8 +185,8 @@ def apply_string_io_headers end def apply_miscellaneous_headers - headers['Content-Length'] = body.bytesize.to_s - headers['Content-MD5'] = Base64.strict_encode64(Digest::MD5.digest(body)) unless headers['Content-MD5'] + headers['Content-Length'] = body.size.to_s + headers['Content-MD5'] = Base64.strict_encode64(Digest::MD5.digest(body.to_s)) unless headers['Content-MD5'] end end end