Mercurial > hg > orthanc-dicomweb
changeset 257:cc1baf85969a
Fix issue #5 (WADO-RS: RetrieveFrames rejects valid accept headers)
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 26 Feb 2019 20:32:09 +0100 |
parents | ce89c852980a |
children | 4e6093d65671 |
files | NEWS Plugin/WadoRsRetrieveFrames.cpp |
diffstat | 2 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Tue Feb 26 18:30:10 2019 +0100 +++ b/NEWS Tue Feb 26 20:32:09 2019 +0100 @@ -6,9 +6,10 @@ * Sending "HttpHeaders" of the "DicomWeb.Servers" configuration to remote DICOMweb servers * Improved WADO-RS compatibility if Orthanc is acting as a DICOMweb client * More detailed information about errors is provided in the HTTP answers -* Fix issue #111/#3 (QIDO-RS: wrong serialization of empty values) -* Fix issue #112/#4 (QIDO-RS: wrong serialization of number values) -* Fix issue #113/#2 (QIDO-RS: wrong serialization of PN VR) +* Fix issue #96 / #5 (WADO-RS: RetrieveFrames rejects valid accept headers) +* Fix issue #111 / #3 (QIDO-RS: wrong serialization of empty values) +* Fix issue #112 / #4 (QIDO-RS: wrong serialization of number values) +* Fix issue #113 / #2 (QIDO-RS: wrong serialization of PN VR) * Upgrade to GDCM 2.8.8 in static builds
--- a/Plugin/WadoRsRetrieveFrames.cpp Tue Feb 26 18:30:10 2019 +0100 +++ b/Plugin/WadoRsRetrieveFrames.cpp Tue Feb 26 20:32:09 2019 +0100 @@ -49,6 +49,17 @@ } +static void RemoveSurroundingQuotes(std::string& value) +{ + if (!value.empty() && + value[0] == '\"' && + value[value.size() - 1] == '\"') + { + value = value.substr(1, value.size() - 2); + } +} + + static gdcm::TransferSyntax ParseTransferSyntax(const OrthancPluginHttpRequest* request) { @@ -89,11 +100,13 @@ if (parsed[0] == "type") { type = parsed[1]; + RemoveSurroundingQuotes(type); } if (parsed[0] == "transfer-syntax") { transferSyntax = parsed[1]; + RemoveSurroundingQuotes(transferSyntax); } }