From 53cf448674a2e760de3a9c0fff99218a766175c5 Mon Sep 17 00:00:00 2001 From: Marco Mancini Date: Fri, 9 Feb 2024 11:27:12 +0100 Subject: [PATCH] B 5768: Fix oneflow client adding uri prefix path (#2931) to the http request path Signed-off-by: Marco Mancini --- src/oca/ruby/opennebula/oneflow_client.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/oca/ruby/opennebula/oneflow_client.rb b/src/oca/ruby/opennebula/oneflow_client.rb index b5af0c5e26..5c26be7578 100644 --- a/src/oca/ruby/opennebula/oneflow_client.rb +++ b/src/oca/ruby/opennebula/oneflow_client.rb @@ -454,11 +454,14 @@ module Service req['User-Agent'] = @user_agent - res = CloudClient::http_start(@uri, @timeout) do |http| + if !@uri.path.nil? + req.instance_variable_set(:@path, @uri.path + req.path) + end + + CloudClient.http_start(@uri, @timeout) do |http| http.request(req) end - res end end end