comparison Plugins/Engine/OrthancPlugins.cpp @ 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 5bcf721bde4f
children ef1e9856c26f
comparison
equal deleted inserted replaced
1917:7db4b909bec3 1918:e8c2f993f6b3
967 967
968 IHttpHandler::Arguments headers; 968 IHttpHandler::Arguments headers;
969 969
970 for (uint32_t i = 0; i < p.headersCount; i++) 970 for (uint32_t i = 0; i < p.headersCount; i++)
971 { 971 {
972 headers[p.headersKeys[i]] = p.headersValues[i]; 972 std::string name(p.headersKeys[i]);
973 std::transform(name.begin(), name.end(), name.begin(), ::tolower);
974 headers[name] = p.headersValues[i];
973 } 975 }
974 976
975 CheckContextAvailable(); 977 CheckContextAvailable();
976 IHttpHandler& handler = pimpl_->context_->GetHttpHandler().RestrictToOrthancRestApi(!p.afterPlugins); 978 IHttpHandler& handler = pimpl_->context_->GetHttpHandler().RestrictToOrthancRestApi(!p.afterPlugins);
977 979