lib/api_auth/request_drivers/rack.rb in api-auth-2.0.0 vs lib/api_auth/request_drivers/rack.rb in api-auth-2.0.1
- old
+ new
@@ -24,13 +24,12 @@
end
md5_base64digest(body)
end
def populate_content_md5
- if %w(POST PUT).include?(@request.request_method)
- @request.env['Content-MD5'] = calculated_md5
- fetch_headers
- end
+ return unless %w(POST PUT).include?(@request.request_method)
+ @request.env['Content-MD5'] = calculated_md5
+ fetch_headers
end
def md5_mismatch?
if %w(POST PUT).include?(@request.request_method)
calculated_md5 != content_md5