Multiple MIME type Accept Headers for Wado-RS

Hello

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: (https://groups.google.com/forum/#!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” http://192.168.109.1:8045/dicom-web/studies/1.2.826.0.1.3680043.8.498.45262650864619686570108269135890142044/metadata

but these calls work:

curl -H “Accept:application/dicom+json” http://192.168.109.1:8045/dicom-web/studies/1.2.826.0.1.3680043.8.498.45262650864619686570108269135890142044/metadata

curl -H “Accept:application/json” http://192.168.109.1:8045/dicom-web/studies/1.2.826.0.1.3680043.8.498.45262650864619686570108269135890142044/metadata

Thanks,

Mark

WadoRsFix.txt (1.17 KB)

Hello,

Thanks for the patch! I have posted a slightly adapted version in the mainline:
https://bitbucket.org/sjodogne/orthanc-dicomweb/commits/105598b74e1ab205caff0a0cec97d78524603ac4

Regards,
Sébastien-