lib/api_auth/request_drivers/httpi.rb in api-auth-2.0.0 vs lib/api_auth/request_drivers/httpi.rb in api-auth-2.0.1
- old
+ new
@@ -18,13 +18,12 @@
def calculated_md5
md5_base64digest(@request.body || '')
end
def populate_content_md5
- if @request.body
- @request.headers['Content-MD5'] = calculated_md5
- fetch_headers
- end
+ return unless @request.body
+ @request.headers['Content-MD5'] = calculated_md5
+ fetch_headers
end
def md5_mismatch?
if @request.body
calculated_md5 != content_md5