changeset 86:e3202f8f3db8 default tip

fix build by removing C++11 primitives
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 May 2025 10:11:13 +0200
parents b1d9e2310431
children
files Framework/PushMode/PushJob.cpp
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/PushMode/PushJob.cpp	Tue May 20 10:07:01 2025 +0200
+++ b/Framework/PushMode/PushJob.cpp	Tue May 20 10:11:13 2025 +0200
@@ -53,13 +53,10 @@
     // an array of cookies returned by the server
     std::vector<std::string> cookies;
 
-    for (const auto &header : headers)
+    for (std::map<std::string, std::string>::const_iterator it = headers.begin(); it != headers.end(); ++it)
     {
-      auto headerName = header.first;
-      auto headerValue = header.second;
-
       // Check if the header is a Set-Cookie header (case-insensitive)
-      if (boost::iequals(headerName, "set-cookie"))
+      if (boost::iequals(it->first, "set-cookie"))
       {
         // Set-Cookie headers are formatted as:
         // Set-Cookie: <cookie-name>=<cookie-value>; <attributes>
@@ -71,9 +68,9 @@
 
         // Split the cookie string by ';' and take the first part (the actual cookie)
         std::vector<std::string> tokens;
-        Orthanc::Toolbox::SplitString(tokens, headerValue, ';');
+        Orthanc::Toolbox::SplitString(tokens, it->second, ';');
         
-        if(!tokens.empty())
+        if (!tokens.empty())
         {
           std::string cookie = tokens[0];
           std::string trimmedCookie = boost::trim_copy(cookie);