# HG changeset patch # User Alain Mazy # Date 1755179588 -7200 # Node ID d58006a63366013af6c8d459a9739be4bd471967 # Parent a90d16a5a27dba407ecf8c895f9b0af83cf77e3d fix false error logs diff -r a90d16a5a27d -r d58006a63366 NEWS --- a/NEWS Tue Jul 22 11:23:54 2025 +0200 +++ b/NEWS Thu Aug 14 15:53:08 2025 +0200 @@ -8,6 +8,8 @@ * New configuration "EnablePerformanceLogs" to display performance logs. Currently only showing the time required to execute a WADO-RS query. For example: WADO-RS: elapsed: 26106623 us, rate: 14.86 instances/s, 155.23Mbps +* Fix false errors logs generated e.g when OHIF requests the /dicom-web/studies/../metadata route: + "dicom-web:/Configuration.cpp:643] Unsupported return MIME type: application/dicom+json, multipart/related; type=application/octet-stream; transfer-syntax=*, will return DICOM+JSON" Version 1.20 (2025-05-12) diff -r a90d16a5a27d -r d58006a63366 Plugin/Configuration.cpp --- a/Plugin/Configuration.cpp Tue Jul 22 11:23:54 2025 +0200 +++ b/Plugin/Configuration.cpp Thu Aug 14 15:53:08 2025 +0200 @@ -626,21 +626,21 @@ std::string accept; Orthanc::Toolbox::ToLowerCase(accept, acceptHeader); - if (accept == "application/dicom+json" || - accept == "application/json" || - accept == "*/*") + if (accept.find("application/dicom+json") != std::string::npos || + accept.find("application/json") != std::string::npos || + accept.find("*/*") != std::string::npos) { return false; } - else if (accept == "application/dicom+xml" || - accept == "application/xml" || - accept == "text/xml") + else if (accept.find("application/dicom+xml") != std::string::npos || + accept.find("application/xml") != std::string::npos || + accept.find("text/xml") != std::string::npos) { return true; } else { - LOG(ERROR) << "Unsupported return MIME type: " << accept << + LOG(WARNING) << "Unsupported return MIME type: " << accept << ", will return DICOM+JSON"; return false; }