# HG changeset patch # User Alain Mazy # Date 1668606168 -3600 # Node ID 222f0652025f97c415524a301ad45c5f671922dc # Parent a2ed57d8a2f05070c9c37c658ec46b9b71c4a7aa fix get argument values that were transformed to lowercase diff -r a2ed57d8a2f0 -r 222f0652025f NEWS --- a/NEWS Thu Nov 10 10:25:27 2022 +0100 +++ b/NEWS Wed Nov 16 14:42:48 2022 +0100 @@ -1,3 +1,10 @@ +Pending changes +==================== + +* fix: get argument values were transformed to lower case +* the "osimis-web-viewer" StandardConfigurations now take into account + the token get argument used when downloading a study from the UI + 2022-11-10 - v 0.4.0 ==================== diff -r a2ed57d8a2f0 -r 222f0652025f Plugin/AssociativeArray.cpp --- a/Plugin/AssociativeArray.cpp Thu Nov 10 10:25:27 2022 +0100 +++ b/Plugin/AssociativeArray.cpp Wed Nov 16 14:42:48 2022 +0100 @@ -25,23 +25,19 @@ AssociativeArray::AssociativeArray(uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, - bool caseSensitive) : - caseSensitive_(caseSensitive) + bool caseSensitiveKeys) : + caseSensitiveKeys_(caseSensitiveKeys) { for (uint32_t i = 0; i < headersCount; i++) { - std::string value; + std::string key = headersKeys[i]; - if (caseSensitive) + if (!caseSensitiveKeys) { - Orthanc::Toolbox::ToLowerCase(value, headersValues[i]); - } - else - { - value = headersValues[i]; + Orthanc::Toolbox::ToLowerCase(key, headersKeys[i]); } - map_[headersKeys[i]] = value; + map_[headersKeys[i]] = headersValues[i]; } } @@ -56,7 +52,7 @@ Map::const_iterator found; - if (caseSensitive_) + if (caseSensitiveKeys_) { found = map_.find(key); } diff -r a2ed57d8a2f0 -r 222f0652025f Plugin/AssociativeArray.h --- a/Plugin/AssociativeArray.h Thu Nov 10 10:25:27 2022 +0100 +++ b/Plugin/AssociativeArray.h Wed Nov 16 14:42:48 2022 +0100 @@ -31,13 +31,13 @@ typedef std::map Map; Map map_; - bool caseSensitive_; + bool caseSensitiveKeys_; public: AssociativeArray(uint32_t headersCount, const char *const *headersKeys, const char *const *headersValues, - bool caseSensitive); + bool caseSensitiveKeys); bool GetValue(std::string& value, const std::string& key) const; diff -r a2ed57d8a2f0 -r 222f0652025f Plugin/Plugin.cpp --- a/Plugin/Plugin.cpp Thu Nov 10 10:25:27 2022 +0100 +++ b/Plugin/Plugin.cpp Wed Nov 16 14:42:48 2022 +0100 @@ -348,6 +348,7 @@ uncheckedResources_.insert("/osimis-viewer/config.js"); tokens_.insert(OrthancPlugins::Token(OrthancPlugins::TokenType_HttpHeader, "token")); + tokens_.insert(OrthancPlugins::Token(OrthancPlugins::TokenType_GetArgument, "token")); // for download links } if (standardConfigurations.find("stone-webviewer") != standardConfigurations.end())