Hi all,
I'd like to start a discussion on the validity/desirability of defining the Content-Type for WADO-RS responses as "multipart/related".
For starters, RFC 2385 (
https://tools.ietf.org/html/rfc2387)defines that only one object should be contained in the message, typed by the "type" parameter in the ContentType header and constructed from one of more body-parts that are in turn typed by the ContentType header in the respective bodypart. To me that doesn't match with the usage as described for WADO-RS where the bodyparts don't make up one object, but are (parts of) different instances.
Second, I'm not happy with the consequence it seems to have with regard to the following situation:
- On the server there is a study with instances stored with multiple transfer syntaxes, eg a series in JPEG Lossless and a series in JPEG 2000.
- The client does a RetrieveStudy request for that study and provides Accept headers for both JPEG Lossless and JPEG 2000 Media Types.
Question: What should the server return as the mediatype in the responses ContentType and what should the mediatype be in bodyparts that contain the frames from the instances in the study?
Desirable (from server's perspective) would be that the frames are returned as stored on the server as client is capable understanding both mediatypes, no conversion cpu overhead is needed and no dataloss occurs if conversion between lossy formats would be needed. The ContentType in the bodypart contains the mediatype for the frame in that bodypart.
But in that case, the server doesn't know what to put in the message header for the mediatype in the ContentType. There are two possible values, both which are not valid for all bodyparts.
Undesirable (from server's perspective) and unnecessary from client's perspective is that server chooses one of the mediatypes from the provided accept headers and converts all frames not matching that mediatype. The mediatype in the message header and in all body parts would then be set to the chosen mediatype.
Unfortunately, it seems that this is the only option available at this moment.
The best way out of this that I see is that "multipart/mixed" is chosen as the contenttype for WADO-RS responses. This solves both issues, as it matches the content better and doesn't have the type parameter.
Another way out, if we need to stick with "multipart/related" (eg. because we cannot change it anymore), is to allow the type parameter in the ContentType header of the response to differ from the message content (eg. "application/octet-stream").
Rationale: If we allow one violation of the base standard already, we can allow some more. This is not my preferred choice.
I'm curious what your feedback/thoughts are on this matter.
Regards,
Jouke Numan
Software Architect
GE Healthcare