changeset 30:1099a148f7e5

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 14 Dec 2016 17:05:41 +0100
parents 22ab2d8566fa
children 9aace933cb64
files Resources/Orthanc/Core/Enumerations.cpp Resources/Orthanc/Core/HttpClient.cpp Resources/Orthanc/Core/OrthancException.h
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/Orthanc/Core/Enumerations.cpp	Tue Nov 29 13:28:21 2016 +0100
+++ b/Resources/Orthanc/Core/Enumerations.cpp	Wed Dec 14 17:05:41 2016 +0100
@@ -1083,15 +1083,18 @@
   bool GetDicomEncoding(Encoding& encoding,
                         const char* specificCharacterSet)
   {
-    std::string s = specificCharacterSet;
+    std::string s = Toolbox::StripSpaces(specificCharacterSet);
     Toolbox::ToUpperCase(s);
 
     // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
     // https://github.com/dcm4che/dcm4che/blob/master/dcm4che-core/src/main/java/org/dcm4che3/data/SpecificCharacterSet.java
     if (s == "ISO_IR 6" ||
-        s == "ISO_IR 192" ||
         s == "ISO 2022 IR 6")
     {
+      encoding = Encoding_Ascii;
+    }
+    else if (s == "ISO_IR 192")
+    {
       encoding = Encoding_Utf8;
     }
     else if (s == "ISO_IR 100" ||
@@ -1238,8 +1241,10 @@
     // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
     switch (encoding)
     {
+      case Encoding_Ascii:
+        return "ISO_IR 6";
+
       case Encoding_Utf8:
-      case Encoding_Ascii:
         return "ISO_IR 192";
 
       case Encoding_Latin1:
--- a/Resources/Orthanc/Core/HttpClient.cpp	Tue Nov 29 13:28:21 2016 +0100
+++ b/Resources/Orthanc/Core/HttpClient.cpp	Wed Dec 14 17:05:41 2016 +0100
@@ -318,10 +318,10 @@
     url_ = "";
     method_ = HttpMethod_Get;
     lastStatus_ = HttpStatus_200_Ok;
-    isVerbose_ = false;
+    SetVerbose(false);
     timeout_ = GlobalParameters::GetInstance().GetDefaultTimeout();
     GlobalParameters::GetInstance().GetDefaultProxy(proxy_);
-    GlobalParameters::GetInstance().GetSslConfiguration(verifyPeers_, caCertificates_);
+    GlobalParameters::GetInstance().GetSslConfiguration(verifyPeers_, caCertificates_);    
   }
 
 
--- a/Resources/Orthanc/Core/OrthancException.h	Tue Nov 29 13:28:21 2016 +0100
+++ b/Resources/Orthanc/Core/OrthancException.h	Wed Dec 14 17:05:41 2016 +0100
@@ -45,7 +45,7 @@
     HttpStatus httpStatus_;
 
   public:
-    OrthancException(ErrorCode errorCode) : 
+    explicit OrthancException(ErrorCode errorCode) : 
       errorCode_(errorCode),
       httpStatus_(ConvertErrorCodeToHttpStatus(errorCode))
     {