changeset 1918:e8c2f993f6b3

fix case for HTTP headers keys in OrthancPluginRestApiGet2
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Feb 2016 15:08:13 +0100
parents 7db4b909bec3
children d9e33b165112
files Plugins/Engine/OrthancPlugins.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Fri Feb 12 11:14:25 2016 +0100
+++ b/Plugins/Engine/OrthancPlugins.cpp	Fri Feb 12 15:08:13 2016 +0100
@@ -969,7 +969,9 @@
 
     for (uint32_t i = 0; i < p.headersCount; i++)
     {
-      headers[p.headersKeys[i]] = p.headersValues[i];
+      std::string name(p.headersKeys[i]);
+      std::transform(name.begin(), name.end(), name.begin(), ::tolower);
+      headers[name] = p.headersValues[i];
     }
 
     CheckContextAvailable();