changeset 12:a203d0a4fd8f

Azure: now removing spaces and CR at the end of the connectionString since it prevented the plugin to initialize.
author Alain Mazy
date Wed, 26 Aug 2020 12:50:39 +0200
parents 1b85dc5eb372
children 3e218a18ec73 234946ea2038
files Azure/AzureBlobStoragePlugin.cpp NEWS
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Azure/AzureBlobStoragePlugin.cpp	Wed Aug 26 11:15:14 2020 +0200
+++ b/Azure/AzureBlobStoragePlugin.cpp	Wed Aug 26 12:50:39 2020 +0200
@@ -21,6 +21,7 @@
 #include <was/storage_account.h>
 #include <was/blob.h>
 #include <boost/lexical_cast.hpp>
+#include <boost/algorithm/string.hpp>
 #include "cpprest/rawptrstream.h"
 
 
@@ -170,6 +171,8 @@
       return nullptr;
     }
 
+    boost::trim(connectionString); // without that, if there's an EOL in the string, it fails with "provided uri is invalid"
+    boost::trim(containerName);
   }
   else if (orthancConfig.IsSection("BlobStorage")) // backward compatibility with the old plugin:
   {
--- a/NEWS	Wed Aug 26 11:15:14 2020 +0200
+++ b/NEWS	Wed Aug 26 12:50:39 2020 +0200
@@ -1,6 +1,8 @@
 Pending changes in the mainline
 ===============================
 
+* Azure: now removing spaces and CR at the end of the connectionString since it prevented the plugin to initialize.
+
 2020-07-20 - v 0.9.2
 ====================