Multiple MIME type Accept Headers for Wado-RS


I’m attaching the diff against the mainline and the fix for multiple MIME accept headers for Wado-RS in the hope that it’s incorporated.

some background -

The way in which the dicomweb plugin processes requests is a little at odds with the RFC2616 section 14. I first noticed it with WadoRs metadata requests, but it’s also an issue with Stow requests as was noted here: (!searchin/orthanc-users/RFC2616/orthanc-users/9o5kItsMQI0/Og6B27YyBgAJ)

Currently this call below fails with the plugin reporting that “application/json, application/dicom+json” is not supported because the entire accept header fragment is being treated as a single MIME type.

curl -H “Accept:application/json, application/dicom+json”

but these calls work:

curl -H “Accept:application/dicom+json”

curl -H “Accept:application/json”



WadoRsFix.txt (1.17 KB)


Thanks for the patch! I have posted a slightly adapted version in the mainline: