From 74656e4854b932b00c5c8188219c13ec0ea9454d Mon Sep 17 00:00:00 2001 From: Shim Shtein Date: Thu, 21 Mar 2024 15:07:35 +0200 Subject: [PATCH] Make sure to forward raw_post for patch commands (cherry picked from commit 32866dc50f59c52e30a0ab84602661e22ee3c4ac) --- app/services/foreman_rh_cloud/cloud_request_forwarder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/foreman_rh_cloud/cloud_request_forwarder.rb b/app/services/foreman_rh_cloud/cloud_request_forwarder.rb index 6e765181..1d991dad 100644 --- a/app/services/foreman_rh_cloud/cloud_request_forwarder.rb +++ b/app/services/foreman_rh_cloud/cloud_request_forwarder.rb @@ -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]