Multiple MIME type Accept Headers for Wado-RS

70 views
Skip to first unread message

Mark Walters

unread,
Aug 29, 2019, 11:13:53 PM8/29/19
to Orthanc Users
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

Sébastien Jodogne

unread,
Aug 30, 2019, 12:50:53 PM8/30/19
to Orthanc Users
Hello,

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

Regards,
Sébastien-
Reply all
Reply to author
Forward
0 new messages