Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package orthanc-dicomweb for 
openSUSE:Factory checked in at 2022-05-12 23:00:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/orthanc-dicomweb (Old)
 and      /work/SRC/openSUSE:Factory/.orthanc-dicomweb.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "orthanc-dicomweb"

Thu May 12 23:00:33 2022 rev:9 rq:976467 version:1.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/orthanc-dicomweb/orthanc-dicomweb.changes        
2021-09-02 23:20:50.408592779 +0200
+++ 
/work/SRC/openSUSE:Factory/.orthanc-dicomweb.new.1538/orthanc-dicomweb.changes  
    2022-05-12 23:01:02.300851420 +0200
@@ -1,0 +2,8 @@
+Tue May 10 20:12:33 UTC 2022 - Axel Braun <[email protected]>
+
+- Version 1.8
+* Show an error message when trying to send studies > 4GB via STOW-RS
+* Optimized QIDO-RS to build its responses from DB if tags are saved in 
"ExtraMainDicomTags".
+* New configuration "PublicRoot" 
+
+-------------------------------------------------------------------

Old:
----
  OrthancDicomWeb-1.7.tar.gz

New:
----
  OrthancDicomWeb-1.8.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ orthanc-dicomweb.spec ++++++
--- /var/tmp/diff_new_pack.YtnsUD/_old  2022-05-12 23:01:02.968852317 +0200
+++ /var/tmp/diff_new_pack.YtnsUD/_new  2022-05-12 23:01:02.968852317 +0200
@@ -1,8 +1,8 @@
 #
 # spec file for package orthanc-dicomweb
 #
-# Copyright (c) 2021 SUSE LLC
-# Copyright (c) 2019-2021 Dr. Axel Braun
+# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2019-2022 Dr. Axel Braun
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 Summary:        WebViewer plugin for Orthanc
 License:        AGPL-3.0-or-later
 Group:          Productivity/Graphics/Viewers
-Version:        1.7
+Version:        1.8
 Release:        0
 URL:            https://orthanc-server.com
 Source0:        
https://www.orthanc-server.com/downloads/get.php?path=/plugin-dicom-web/OrthancDicomWeb-%{version}.tar.gz

++++++ OrthancDicomWeb-1.7.tar.gz -> OrthancDicomWeb-1.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/.hg_archival.txt 
new/OrthancDicomWeb-1.8/.hg_archival.txt
--- old/OrthancDicomWeb-1.7/.hg_archival.txt    2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/.hg_archival.txt    2022-05-09 14:38:05.000000000 
+0200
@@ -1,6 +1,6 @@
 repo: d5f45924411123cfd02d035fd50b8e37536eadef
-node: f5b64f680bfbea760169e72602498b946c58c234
-branch: OrthancDicomWeb-1.7
+node: 435d7e6d8caae93c167041b764c92685b7e0a25f
+branch: OrthancDicomWeb-1.8
 latesttag: null
-latesttagdistance: 469
-changessincelatesttag: 498
+latesttagdistance: 478
+changessincelatesttag: 508
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/.hgignore 
new/OrthancDicomWeb-1.8/.hgignore
--- old/OrthancDicomWeb-1.7/.hgignore   2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/.hgignore   2022-05-09 14:38:05.000000000 +0200
@@ -4,3 +4,4 @@
 *.cpp.orig
 *.h.orig
 *~
+.vscode/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/CMakeLists.txt 
new/OrthancDicomWeb-1.8/CMakeLists.txt
--- old/OrthancDicomWeb-1.7/CMakeLists.txt      2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/CMakeLists.txt      2022-05-09 14:38:05.000000000 
+0200
@@ -21,7 +21,7 @@
 
 project(OrthancDicomWeb)
 
-set(ORTHANC_DICOM_WEB_VERSION "1.7")
+set(ORTHANC_DICOM_WEB_VERSION "1.8")
 
 if (ORTHANC_DICOM_WEB_VERSION STREQUAL "mainline")
   set(ORTHANC_FRAMEWORK_DEFAULT_VERSION "mainline")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/NEWS new/OrthancDicomWeb-1.8/NEWS
--- old/OrthancDicomWeb-1.7/NEWS        2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/NEWS        2022-05-09 14:38:05.000000000 +0200
@@ -1,5 +1,40 @@
-Pending changes in the mainline
-===============================
+Version 1.8 (2022-05-09)
+========================
+
+=> Minimum Orthanc version: 1.11.0 <=
+
+* Show an error message when trying to send studies > 4GB via STOW-RS
+* Optimized QIDO-RS to build its responses from DB if tags are saved in 
"ExtraMainDicomTags".
+  Recommended configuration to optmize dicom-web usage:
+    "ExtraMainDicomTags" : {
+      "Instance" : [
+        "Rows",
+        "Columns",
+        "ImageType",
+        "SOPClassUID",
+        "ContentDate",
+        "ContentTime",
+        "FrameOfReferenceUID",
+        "PixelSpacing",
+        "SpecificCharacterSet",
+        "BitsAllocated",
+        "BitsStored"
+      ],
+      "Series" : [
+        "TimezoneOffsetFromUTC",
+        "PerformedProcedureStepStartDate",
+        "PerformedProcedureStepStartTime"
+      ],
+      "Study": [
+        "TimezoneOffsetFromUTC"
+      ],
+      "Patient": []
+    }
+* New configuration "PublicRoot" that is used in RetrieveUrl tags
+  and location information.  This is useful if, e.g, your Orthanc is
+  behind a reverse-proxy and has another base endpoint than the "Root"
+  one.  Note that, if using a reverse-proxy, make sure to set the "host"
+  and "proto" correctly in the "Forwarded" HTTP headers.
 
 
 Version 1.7 (2021-08-31)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/Configuration.cpp 
new/OrthancDicomWeb-1.8/Plugin/Configuration.cpp
--- old/OrthancDicomWeb-1.7/Plugin/Configuration.cpp    2021-08-31 
15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Plugin/Configuration.cpp    2022-05-09 
14:38:05.000000000 +0200
@@ -362,11 +362,10 @@
       return configuration_->GetUnsignedIntegerValue(key, defaultValue);
     }
 
-
-    std::string GetDicomWebRoot()
+    std::string GetRootPath(const char* configName, const char* defaultValue)
     {
       assert(configuration_.get() != NULL);
-      std::string root = configuration_->GetStringValue("Root", "/dicom-web/");
+      std::string root = configuration_->GetStringValue(configName, 
defaultValue);
 
       // Make sure the root URI starts and ends with a slash
       if (root.size() == 0 ||
@@ -383,7 +382,17 @@
       return root;
     }
 
-    
+    std::string GetDicomWebRoot()
+    {
+      return GetRootPath("Root", "/dicom-web/");
+    }
+
+    std::string GetPublicRoot()
+    {
+      std::string root = GetDicomWebRoot();
+      return GetRootPath("PublicRoot", root.c_str());
+    }
+
     std::string GetOrthancApiRoot()
     {
       std::string root = Configuration::GetDicomWebRoot();
@@ -476,7 +485,7 @@
     }
 
 
-    std::string GetBaseUrl(const HttpClient::HttpHeaders& headers)
+    std::string GetBasePublicUrl(const HttpClient::HttpHeaders& headers)
     {
       assert(configuration_.get() != NULL);
       std::string host = configuration_->GetStringValue("Host", "");
@@ -530,11 +539,10 @@
         host = "localhost:8042";
       }
 
-      return (https ? "https://"; : "http://";) + host + GetDicomWebRoot();
+      return (https ? "https://"; : "http://";) + host + GetPublicRoot();
     }
 
-
-    std::string GetBaseUrl(const OrthancPluginHttpRequest* request)
+    std::string GetBasePublicUrl(const OrthancPluginHttpRequest* request)
     {
       HttpClient::HttpHeaders headers;
 
@@ -549,7 +557,7 @@
         headers["Host"] = value;
       }
 
-      return GetBaseUrl(headers);
+      return GetBasePublicUrl(headers);
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/Configuration.h 
new/OrthancDicomWeb-1.8/Plugin/Configuration.h
--- old/OrthancDicomWeb-1.7/Plugin/Configuration.h      2021-08-31 
15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Plugin/Configuration.h      2022-05-09 
14:38:05.000000000 +0200
@@ -105,14 +105,17 @@
 
     std::string GetDicomWebRoot();
 
+    std::string GetPublicRoot();
+
     std::string GetOrthancApiRoot();
 
     std::string GetWadoRoot();
       
-    std::string GetBaseUrl(const std::map<std::string, std::string>& headers);
+    std::string GetBasePublicUrl(const std::map<std::string, std::string>& 
headers);
 
     // TODO => REMOVE
-    std::string GetBaseUrl(const OrthancPluginHttpRequest* request);
+    std::string GetBasePublicUrl(const OrthancPluginHttpRequest* request);
+
 
     std::string GetWadoUrl(const std::string& wadoBase,
                            const std::string& studyInstanceUid,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/Plugin.cpp 
new/OrthancDicomWeb-1.8/Plugin/Plugin.cpp
--- old/OrthancDicomWeb-1.7/Plugin/Plugin.cpp   2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/Plugin/Plugin.cpp   2022-05-09 14:38:05.000000000 
+0200
@@ -35,6 +35,11 @@
 #include <boost/algorithm/string/predicate.hpp>
 
 
+#define ORTHANC_CORE_MINIMAL_MAJOR     1
+#define ORTHANC_CORE_MINIMAL_MINOR     11
+#define ORTHANC_CORE_MINIMAL_REVISION  0
+
+
 static const char* const HAS_DELETE = "HasDelete";
 
 
@@ -512,6 +517,20 @@
       return -1;
     }
 
+    if (!OrthancPlugins::CheckMinimalOrthancVersion(ORTHANC_CORE_MINIMAL_MAJOR,
+                                                    ORTHANC_CORE_MINIMAL_MINOR,
+                                                    
ORTHANC_CORE_MINIMAL_REVISION))
+    {
+      char info[1024];
+      sprintf(info, "Your version of Orthanc (%s) must be above %d.%d.%d to 
run this plugin",
+              context->orthancVersion,
+              ORTHANC_CORE_MINIMAL_MAJOR,
+              ORTHANC_CORE_MINIMAL_MINOR,
+              ORTHANC_CORE_MINIMAL_REVISION);
+      OrthancPluginLogError(context, info);
+      return -1;
+    }
+
 #if HAS_ORTHANC_PLUGIN_CHUNKED_HTTP_CLIENT == 0
     LOG(WARNING) << "Performance warning in DICOMweb: The plugin was compiled 
against "
                  << "Orthanc SDK <= 1.5.6. STOW and WADO chunked transfers 
will be entirely stored in RAM.";
@@ -608,6 +627,9 @@
         
         std::string uri = root + "app/client/index.html";
         OrthancPluginSetRootUri(context, uri.c_str());
+
+        std::string publicUrlRoot = 
OrthancPlugins::Configuration::GetPublicRoot();
+        OrthancPlugins::LogWarning("DICOMWeb PublicRoot: " + publicUrlRoot);
       }
       else
       {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/QidoRs.cpp 
new/OrthancDicomWeb-1.8/Plugin/QidoRs.cpp
--- old/OrthancDicomWeb-1.7/Plugin/QidoRs.cpp   2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/Plugin/QidoRs.cpp   2022-05-09 14:38:05.000000000 
+0200
@@ -66,7 +66,7 @@
           result.insert(Orthanc::DicomTag(0x0008, 0x0030));  // Study Time
           result.insert(Orthanc::DicomTag(0x0008, 0x0050));  // Accession 
Number
           result.insert(Orthanc::DicomTag(0x0008, 0x0056));  // Instance 
Availability
-          //result.insert(Orthanc::DicomTag(0x0008, 0x0061));  // Modalities 
in Study  => SPECIAL CASE
+          result.insert(Orthanc::DicomTag(0x0008, 0x0061));  // Modalities in 
Study  => SPECIAL CASE
           result.insert(Orthanc::DicomTag(0x0008, 0x0090));  // Referring 
Physician's Name
           result.insert(Orthanc::DicomTag(0x0008, 0x0201));  // Timezone 
Offset From UTC
           //result.insert(Orthanc::DicomTag(0x0008, 0x1190));  // Retrieve URL 
 => SPECIAL CASE
@@ -76,8 +76,8 @@
           result.insert(Orthanc::DicomTag(0x0010, 0x0040));  // Patient's Sex
           result.insert(Orthanc::DicomTag(0x0020, 0x000D));  // Study Instance 
UID
           result.insert(Orthanc::DicomTag(0x0020, 0x0010));  // Study ID
-          //result.insert(Orthanc::DicomTag(0x0020, 0x1206));  // Number of 
Study Related Series  => SPECIAL CASE
-          //result.insert(Orthanc::DicomTag(0x0020, 0x1208));  // Number of 
Study Related Instances  => SPECIAL CASE
+          result.insert(Orthanc::DicomTag(0x0020, 0x1206));  // Number of 
Study Related Series  => SPECIAL CASE
+          result.insert(Orthanc::DicomTag(0x0020, 0x1208));  // Number of 
Study Related Instances  => SPECIAL CASE
           break;
 
         case Orthanc::ResourceType_Series:
@@ -89,7 +89,7 @@
           //result.insert(Orthanc::DicomTag(0x0008, 0x1190));  // Retrieve URL 
 => SPECIAL CASE
           result.insert(Orthanc::DicomTag(0x0020, 0x000E));  // Series 
Instance UID
           result.insert(Orthanc::DicomTag(0x0020, 0x0011));  // Series Number
-          //result.insert(Orthanc::DicomTag(0x0020, 0x1209));  // Number of 
Series Related Instances  => SPECIAL CASE
+          result.insert(Orthanc::DicomTag(0x0020, 0x1209));  // Number of 
Series Related Instances  => SPECIAL CASE
           result.insert(Orthanc::DicomTag(0x0040, 0x0244));  // Performed 
Procedure Step Start Date
           result.insert(Orthanc::DicomTag(0x0040, 0x0245));  // Performed 
Procedure Step Start Time
           result.insert(Orthanc::DicomTag(0x0040, 0x0275));  // Request 
Attribute Sequence
@@ -272,10 +272,12 @@
         result["CaseSensitive"] = caseSensitive;
       }
 
-      result["Expand"] = false;
+      result["Expand"] = true;
+      result["Full"] = true;
       result["Query"] = Json::objectValue;
       result["Limit"] = limit_;
       result["Since"] = offset_;
+      result["RequestedTags"] = Json::arrayValue;
 
       if (offset_ != 0 &&
           !OrthancPlugins::CheckMinimalOrthancVersion(1, 3, 0))
@@ -290,130 +292,22 @@
       {
         result["Query"][it->first.Format()] = it->second;
       }
-    }
 
+      std::set<Orthanc::DicomTag> requestedTags;
+      ExtractResultFields(requestedTags, level);
 
-    void ComputeDerivedTags(Orthanc::DicomMap& target,
-                            std::string& someInstance,
-                            Orthanc::ResourceType level,
-                            const std::string& resource) const
-    {
-      static const char* const INSTANCES = "Instances";      
-      static const char* const MAIN_DICOM_TAGS = "MainDicomTags";
-      static const char* const MODALITY = "Modality";
-      
-      switch (level)
+      for (std::set<Orthanc::DicomTag>::const_iterator it = 
requestedTags.begin();
+          it != requestedTags.end(); it++)
       {
-        case Orthanc::ResourceType_Instance:
-          someInstance = resource;
-          break;
-
-        case Orthanc::ResourceType_Study:
-        {
-          Json::Value series;
-          if (OrthancPlugins::RestApiGet(series, "/studies/" + resource + 
"/series?expand", false) &&
-              series.type() == Json::arrayValue)
-          {
-            // Collect the Modality of all the child series, and 
-            std::set<std::string> modalities;
-            unsigned int countInstances = 0;
-            
-            for (Json::Value::ArrayIndex i = 0; i < series.size(); i++)
-            {
-              if (series[i].type() == Json::objectValue)
-              {
-                if (series[i].isMember(MAIN_DICOM_TAGS) &&
-                    series[i][MAIN_DICOM_TAGS].type() == Json::objectValue &&
-                    series[i][MAIN_DICOM_TAGS].isMember(MODALITY) &&
-                    series[i][MAIN_DICOM_TAGS][MODALITY].type() == 
Json::stringValue)
-                {
-                  
modalities.insert(series[i][MAIN_DICOM_TAGS][MODALITY].asString());
-                }
-                
-                if (series[i].isMember(INSTANCES) &&
-                    series[i][INSTANCES].type() == Json::arrayValue)
-                {
-                  if (series[i][INSTANCES].size() > 0 &&
-                      series[i][INSTANCES][0].type() == Json::stringValue)
-                  {
-                    someInstance = series[i][INSTANCES][0].asString();
-                  }
-                  
-                  countInstances += series[i][INSTANCES].size();
-                }
-              }
-            }
-
-            target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES,
-                            boost::lexical_cast<std::string>(series.size()), 
false);
-            
-            
target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES,
-                            boost::lexical_cast<std::string>(countInstances), 
false);
-            
-            std::string s;
-            for (std::set<std::string>::const_iterator 
-                   it = modalities.begin(); it != modalities.end(); ++it)
-            {
-              if (!s.empty())
-              {
-                s += "\\";
-              }
-
-              s += *it;
-            }
-
-            target.SetValue(Orthanc::DICOM_TAG_MODALITIES_IN_STUDY, s, false);
-          }
-          else
-          {
-            target.SetValue(Orthanc::DICOM_TAG_MODALITIES_IN_STUDY, "", false);
-            target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_STUDY_RELATED_SERIES, 
"0", false);
-            
target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_STUDY_RELATED_INSTANCES, "0", 
false);
-          }
-
-          break;
-        }
-
-        case Orthanc::ResourceType_Series:
-        {
-          Json::Value series;
-          if (OrthancPlugins::RestApiGet(series, "/series/" + resource, false) 
&&
-              series.type() == Json::objectValue &&
-              series.isMember(INSTANCES) &&
-              series[INSTANCES].type() == Json::arrayValue)
-          {
-            if (series[INSTANCES].size() > 0 &&
-                series[INSTANCES][0].type() == Json::stringValue)
-            {
-              someInstance = series[INSTANCES][0].asString();
-            }
-            
-            // Number of Series Related Instances
-            
target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_SERIES_RELATED_INSTANCES, 
-                            
boost::lexical_cast<std::string>(series[INSTANCES].size()), false);
-          }
-          else
-          {
-            // Should never happen
-            
target.SetValue(Orthanc::DICOM_TAG_NUMBER_OF_SERIES_RELATED_INSTANCES, "0", 
false);
-          }
-
-          break;
-        }
-
-        default:
-          throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
+        result["RequestedTags"].append(it->Format());
       }
-    }                              
+    }
 
 
-    void ExtractFields(Orthanc::DicomMap& result,
-                       const Orthanc::DicomMap& source,
-                       const std::string& wadoBase,
-                       Orthanc::ResourceType level) const
-    {
-      std::set<Orthanc::DicomTag> fields;
 
+    void ExtractResultFields(std::set<Orthanc::DicomTag>& fields,
+                             Orthanc::ResourceType level) const
+    {
       for (std::list<Orthanc::DicomTag>::const_iterator
              it = includeFields_.begin(); it != includeFields_.end(); ++it)
       {
@@ -447,6 +341,16 @@
         AddResultAttributesForLevel(fields, Orthanc::ResourceType_Series);
       }
 
+    }
+
+    void ExtractFields(Orthanc::DicomMap& result,
+                       const Orthanc::DicomMap& source,
+                       const std::string& wadoBasePublicUrl,
+                       Orthanc::ResourceType level) const
+    {
+      std::set<Orthanc::DicomTag> fields;
+      ExtractResultFields(fields, level);
+
       // Copy all the required fields to the target
       for (std::set<Orthanc::DicomTag>::const_iterator
              it = fields.begin(); it != fields.end(); ++it)
@@ -459,7 +363,7 @@
       }
 
       // Set the retrieve URL for WADO-RS
-      std::string url = (wadoBase + "studies/" +
+      std::string url = (wadoBasePublicUrl + "studies/" +
                          
source.GetStringValue(Orthanc::DICOM_TAG_STUDY_INSTANCE_UID, "", false));
 
       if (level == Orthanc::ResourceType_Series || 
@@ -501,35 +405,26 @@
     throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
   }
 
-  std::string wadoBase = OrthancPlugins::Configuration::GetBaseUrl(request);
+  std::string wadoBasePublicUrl = 
OrthancPlugins::Configuration::GetBasePublicUrl(request);
 
   OrthancPlugins::DicomWebFormatter::HttpWriter writer(
     output, OrthancPlugins::Configuration::IsXmlExpected(request));
 
-  // Fix of issue #13
   for (Json::Value::ArrayIndex i = 0; i < resources.size(); i++)
   {
-    const std::string resource = resources[i].asString();
+    const Json::Value& resource = resources[i];
 
-    Orthanc::DicomMap derivedTags;
-    std::string someInstance;
-    matcher.ComputeDerivedTags(derivedTags, someInstance, level, resource);
-    
-    Json::Value tags;
-    if (!someInstance.empty() &&
-        OrthancPlugins::RestApiGet(tags, "/instances/" + someInstance + 
"/tags", false))
+    Orthanc::DicomMap source;
+    if (resource["RequestedTags"].isObject())
     {
-      Orthanc::DicomMap source;
-      source.FromDicomAsJson(tags);
+      source.FromDicomAsJson(resource["RequestedTags"]);
+    }
 
-      Orthanc::DicomMap target;
-      target.Assign(derivedTags);
-      matcher.ExtractFields(target, source, wadoBase, level);
+    Orthanc::DicomMap target;
 
-      writer.AddOrthancMap(target);
-    }
+    matcher.ExtractFields(target, source, wadoBasePublicUrl, level);
+    writer.AddOrthancMap(target);
   }
-
   writer.Send();
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/StowRs.cpp 
new/OrthancDicomWeb-1.8/Plugin/StowRs.cpp
--- old/OrthancDicomWeb-1.7/Plugin/StowRs.cpp   2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/Plugin/StowRs.cpp   2022-05-09 14:38:05.000000000 
+0200
@@ -32,7 +32,7 @@
                          const std::string& expectedStudy) :
     context_(context),
     xml_(Configuration::IsXmlExpected(headers)),
-    wadoBase_(Configuration::GetBaseUrl(headers)),
+    wadoBasePublicUrl_(Configuration::GetBasePublicUrl(headers)),
     expectedStudy_(expectedStudy),
     isFirst_(true),
     result_(Json::objectValue),
@@ -173,7 +173,7 @@
     {
       if (isFirst_)
       {
-        std::string url = wadoBase_ + "studies/" + studyInstanceUid;
+        std::string url = wadoBasePublicUrl_ + "studies/" + studyInstanceUid;
         result_[DICOM_TAG_RETRIEVE_URL.Format()] = url;
         isFirst_ = false;
       }
@@ -184,7 +184,7 @@
 
       if (ok)
       {
-        std::string url = (wadoBase_ + 
+        std::string url = (wadoBasePublicUrl_ + 
                            "studies/" + studyInstanceUid +
                            "/series/" + seriesInstanceUid +
                            "/instances/" + sopInstanceUid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/StowRs.h 
new/OrthancDicomWeb-1.8/Plugin/StowRs.h
--- old/OrthancDicomWeb-1.7/Plugin/StowRs.h     2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/Plugin/StowRs.h     2022-05-09 14:38:05.000000000 
+0200
@@ -35,7 +35,7 @@
   private:
     OrthancPluginContext*  context_;
     bool                   xml_;
-    std::string            wadoBase_;
+    std::string            wadoBasePublicUrl_;
     std::string            expectedStudy_;
     bool                   isFirst_;
     Json::Value            result_;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/WadoRs.cpp 
new/OrthancDicomWeb-1.8/Plugin/WadoRs.cpp
--- old/OrthancDicomWeb-1.7/Plugin/WadoRs.cpp   2021-08-31 15:32:10.000000000 
+0200
+++ new/OrthancDicomWeb-1.8/Plugin/WadoRs.cpp   2022-05-09 14:38:05.000000000 
+0200
@@ -1127,7 +1127,7 @@
         for (std::list<Identifier>::const_iterator b = instances.begin(); b != 
instances.end(); ++b)
         {
           WriteInstanceMetadata(writer, mode, cache, b->GetOrthancId(), 
studyInstanceUid, a->GetDicomUid(),
-                                b->GetDicomUid(), 
OrthancPlugins::Configuration::GetBaseUrl(request));
+                                b->GetDicomUid(), 
OrthancPlugins::Configuration::GetBasePublicUrl(request));
         }
       }
 
@@ -1166,7 +1166,7 @@
       for (std::list<Identifier>::const_iterator a = instances.begin(); a != 
instances.end(); ++a)
       {
         WriteInstanceMetadata(writer, mode, cache, a->GetOrthancId(), 
studyInstanceUid, seriesInstanceUid,
-                              a->GetDicomUid(), 
OrthancPlugins::Configuration::GetBaseUrl(request));
+                              a->GetDicomUid(), 
OrthancPlugins::Configuration::GetBasePublicUrl(request));
       }
 
       writer.Send();
@@ -1193,7 +1193,7 @@
     {
       OrthancPlugins::DicomWebFormatter::HttpWriter writer(output, isXml);
       WriteInstanceMetadata(writer, OrthancPlugins::MetadataMode_Full, cache, 
orthancId, studyInstanceUid,
-                            seriesInstanceUid, sopInstanceUid, 
OrthancPlugins::Configuration::GetBaseUrl(request));
+                            seriesInstanceUid, sopInstanceUid, 
OrthancPlugins::Configuration::GetBasePublicUrl(request));
       writer.Send();      
     }
   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Plugin/WadoRsRetrieveFrames.cpp 
new/OrthancDicomWeb-1.8/Plugin/WadoRsRetrieveFrames.cpp
--- old/OrthancDicomWeb-1.7/Plugin/WadoRsRetrieveFrames.cpp     2021-08-31 
15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Plugin/WadoRsRetrieveFrames.cpp     2022-05-09 
14:38:05.000000000 +0200
@@ -409,7 +409,7 @@
     OrthancPluginErrorCode error;
 
 #if HAS_SEND_MULTIPART_ITEM_2 == 1
-    const std::string base = 
OrthancPlugins::Configuration::GetBaseUrl(request);
+    const std::string base = 
OrthancPlugins::Configuration::GetBasePublicUrl(request);
     std::string location = (
       OrthancPlugins::Configuration::GetWadoUrl(base, studyInstanceUid, 
seriesInstanceUid, sopInstanceUid) +
       "frames/" + boost::lexical_cast<std::string>(*frame + 1));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/AutoGeneratedCode.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/AutoGeneratedCode.cmake
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/AutoGeneratedCode.cmake     
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/AutoGeneratedCode.cmake     
2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/Compiler.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/Compiler.cmake
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/Compiler.cmake      
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/Compiler.cmake      
2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake  
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/DownloadOrthancFramework.cmake  
    2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/DownloadPackage.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/DownloadPackage.cmake
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/DownloadPackage.cmake       
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/DownloadPackage.cmake       
2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/EmbedResources.py 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/EmbedResources.py
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/EmbedResources.py   
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/EmbedResources.py   
2022-05-09 14:38:05.000000000 +0200
@@ -4,6 +4,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake   
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/CMake/GoogleTestConfiguration.cmake   
    2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp   
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp   
    2022-05-09 14:38:05.000000000 +0200
@@ -3,6 +3,7 @@
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
  * Copyright (C) 2017-2021 Osimis S.A., Belgium
+ * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -539,6 +540,13 @@
                               const std::string& password)
   {
     Clear();
+
+    if (body.size() > 0xffffffffu)
+    {
+      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
+    }
+
     return CheckHttp(OrthancPluginHttpPost(GetGlobalContext(), &buffer_, 
url.c_str(),
                                            body.c_str(), body.size(),
                                            username.empty() ? NULL : 
username.c_str(),
@@ -552,6 +560,13 @@
                              const std::string& password)
   {
     Clear();
+
+    if (body.size() > 0xffffffffu)
+    {
+      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
+    }
+
     return CheckHttp(OrthancPluginHttpPut(GetGlobalContext(), &buffer_, 
url.c_str(),
                                           body.empty() ? NULL : body.c_str(),
                                           body.size(),
@@ -1892,6 +1907,12 @@
       
ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(OrthancPluginErrorCode_ParameterOutOfRange);
     }
 
+    if (body.size() > 0xffffffffu)
+    {
+      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
+    }
+
     OrthancPlugins::MemoryBuffer answer;
     uint16_t status;
     OrthancPluginErrorCode code = OrthancPluginCallPeerApi
@@ -1920,6 +1941,12 @@
       
ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(OrthancPluginErrorCode_ParameterOutOfRange);
     }
 
+    if (body.size() > 0xffffffffu)
+    {
+      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
+    }
+
     OrthancPlugins::MemoryBuffer answer;
     uint16_t status;
     OrthancPluginErrorCode code = OrthancPluginCallPeerApi
@@ -2883,6 +2910,12 @@
 
     MemoryBuffer answerBodyBuffer, answerHeadersBuffer;
 
+    if (body.size() > 0xffffffffu)
+    {
+      LogError("Cannot handle body size > 4GB");
+      ORTHANC_PLUGINS_THROW_EXCEPTION(InternalError);
+    }
+
     OrthancPluginErrorCode error = OrthancPluginHttpClient(
       GetGlobalContext(),
       *answerBodyBuffer,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h 
2022-05-09 14:38:05.000000000 +0200
@@ -3,6 +3,7 @@
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
  * Copyright (C) 2017-2021 Osimis S.A., Belgium
+ * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginException.h 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginException.h
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginException.h  
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginException.h  
2022-05-09 14:38:05.000000000 +0200
@@ -3,6 +3,7 @@
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
  * Copyright (C) 2017-2021 Osimis S.A., Belgium
+ * Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake   
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Plugins/OrthancPluginsExports.cmake   
    2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
       2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/LinuxStandardBaseToolchain.cmake
       2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake
 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain32.cmake
    2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake
 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake
--- 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake
    2021-08-31 15:32:10.000000000 +0200
+++ 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGW-W64-Toolchain64.cmake
    2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGWToolchain.cmake 
new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGWToolchain.cmake
--- old/OrthancDicomWeb-1.7/Resources/Orthanc/Toolchains/MinGWToolchain.cmake   
2021-08-31 15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/Orthanc/Toolchains/MinGWToolchain.cmake   
2022-05-09 14:38:05.000000000 +0200
@@ -2,6 +2,7 @@
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
 # Copyright (C) 2017-2021 Osimis S.A., Belgium
+# Copyright (C) 2021-2021 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/Resources/SyncOrthancFolder.py 
new/OrthancDicomWeb-1.8/Resources/SyncOrthancFolder.py
--- old/OrthancDicomWeb-1.7/Resources/SyncOrthancFolder.py      2021-08-31 
15:32:10.000000000 +0200
+++ new/OrthancDicomWeb-1.8/Resources/SyncOrthancFolder.py      2022-05-09 
14:38:05.000000000 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 #
 # This maintenance script updates the content of the "Orthanc" folder
@@ -8,7 +8,7 @@
 import multiprocessing
 import os
 import stat
-import urllib2
+import urllib.request
 
 TARGET = os.path.join(os.path.dirname(__file__), 'Orthanc')
 PLUGIN_SDK_VERSION = '1.7.0'
@@ -45,7 +45,7 @@
     branch = x[0]
     source = x[1]
     target = os.path.join(TARGET, x[2])
-    print target
+    print(target)
 
     try:
         os.makedirs(os.path.dirname(target))
@@ -54,9 +54,9 @@
 
     url = '%s/%s/%s' % (REPOSITORY, branch, source)
 
-    with open(target, 'w') as f:
+    with open(target, 'wb') as f:
         try:
-            f.write(urllib2.urlopen(url).read())
+            f.write(urllib.request.urlopen(url).read())
         except:
             print('ERROR %s' % url)
             raise
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/OrthancDicomWeb-1.7/TODO new/OrthancDicomWeb-1.8/TODO
--- old/OrthancDicomWeb-1.7/TODO        1970-01-01 01:00:00.000000000 +0100
+++ new/OrthancDicomWeb-1.8/TODO        2022-05-09 14:38:05.000000000 +0200
@@ -0,0 +1,2 @@
+* Implement capabilities: 
https://www.dicomstandard.org/using/dicomweb/capabilities/
+  from 
https://groups.google.com/d/msgid/orthanc-users/c60227f2-c6da-4fd9-9b03-3ce9bf7d1af5n%40googlegroups.com?utm_medium=email&utm_source=footer
\ No newline at end of file

Reply via email to