Skip to content

Commit 12b5a47

Browse files
committed
Merge pull request #1 from proglottis/fix_put_requests
Fix PUT requests
2 parents 4bc83d1 + 26ceb39 commit 12b5a47

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/oauth/request_proxy/action_controller_request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def parameters_for_signature
3636
params << header_params.to_query
3737
params << request.query_string unless query_string_blank?
3838

39-
if request.post? && request.content_type.to_s.downcase.start_with?("application/x-www-form-urlencoded")
39+
if (request.post? || request.put?) && request.content_type.to_s.downcase.start_with?("application/x-www-form-urlencoded")
4040
params << request.raw_post
4141
end
4242
end

lib/oauth/request_proxy/action_dispatch_request.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def parameters_for_signature
3535
params << header_params.to_query
3636
params << request.query_string unless query_string_blank?
3737

38-
if request.post? && request.content_type == Mime::Type.lookup("application/x-www-form-urlencoded")
38+
if (request.post? || request.put?) && request.content_type == Mime::Type.lookup("application/x-www-form-urlencoded")
3939
params << request.raw_post
4040
end
4141
end
@@ -59,4 +59,4 @@ def request_params
5959

6060
end
6161

62-
end
62+
end

0 commit comments

Comments
 (0)