Skip to content

Commit

Permalink
Make sure to forward raw_post for patch commands
Browse files Browse the repository at this point in the history
(cherry picked from commit 32866dc)
  • Loading branch information
ShimShtein authored and Odilhao committed Nov 12, 2024
1 parent 8aea902 commit 74656e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/foreman_rh_cloud/cloud_request_forwarder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def prepare_request_opts(original_request, forward_payload, forward_params, cert
def prepare_forward_payload(original_request, controller_name)
forward_payload = original_request.request_parameters[controller_name]

forward_payload = original_request.raw_post.clone if original_request.post? && original_request.raw_post
forward_payload = original_request.raw_post.clone if (original_request.post? || original_request.patch?) && original_request.raw_post
forward_payload = original_request.body.read if original_request.put?

forward_payload = original_request.params.slice(:file, :metadata) if original_request.params[:file]
Expand Down

0 comments on commit 74656e4

Please sign in to comment.