Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

[#50801] Failing outbound request to Nextcloud (cURL host duplication in URL)

Wieland Lindenthal29d9874c83a6
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/upload_link_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/upload_link_query.rb
index d0dd7ad4956..762dcf3fb2e 100644
--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/upload_link_query.rb
+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/upload_link_query.rb
@@ -67,12 +67,13 @@ module Storages::Peripherals::StorageInteraction::Nextcloud
def outbound_response(method:, relative_path:, payload:, token:)
response = Util.http(@uri).post(
- Util.join_uri_path(@uri, relative_path),
+ Util.join_uri_path(@uri.path, relative_path),
payload.to_json,
{
'Authorization' => "Bearer #{token.access_token}",
'Accept' => 'application/json',
- 'Content-Type' => 'application/json'
+ 'Content-Type' => 'application/json',
+ 'OCS-APIRequest' => 'true'
}
)
case response