diff OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.cpp @ 2153:32bfccdc030f

consistency in the way URLs are concatenated
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 Sep 2024 18:09:24 +0200
parents 16c01cc201e7
children
line wrap: on
line diff
--- a/OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.cpp	Sat Aug 31 08:37:39 2024 +0200
+++ b/OrthancStone/Sources/Platforms/WebAssembly/WebAssemblyOracle.cpp	Wed Sep 25 18:09:24 2024 +0200
@@ -29,6 +29,8 @@
 #  include <Oracle/WebAssemblyOracle_Includes.h>
 #endif
 
+#include "../../Toolbox/StoneToolbox.h"
+
 #include <OrthancException.h>
 #include <Toolbox.h>
 
@@ -542,11 +544,11 @@
   {
     if (isLocalOrthanc_)
     {
-      command.SetUrl(localOrthancRoot_ + uri);
+      command.SetUrl(StoneToolbox::JoinUrl(localOrthancRoot_, uri));
     }
     else
     {
-      command.SetUrl(remoteOrthanc_.GetUrl() + uri);
+      command.SetUrl(StoneToolbox::JoinUrl(remoteOrthanc_.GetUrl(), uri));
       command.AddHttpHeaders(remoteOrthanc_.GetHttpHeaders());
       
       if (!remoteOrthanc_.GetUsername().empty())