Skip to content

Conversation

cgorman
Copy link

@cgorman cgorman commented Apr 25, 2023

Depending on the IMS implementation, they may return octet-stream when image/jpeg is available because octet-stream appears higher on the list of acceptable media types. This PR adds q=0.9 to the field value.

Fixes #80

@cgorman
Copy link
Author

cgorman commented Apr 25, 2023

I've tested this with Slim for a month or so using patch-package for local and remote IMS instances (dcm4chee, google, and GE) and it has been working well FWIW

Copy link
Contributor

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment, but can you also provide some more context for why the change is needed and ideally a link to the standard describing this option?


if (mediaType.endsWith("octet-stream")) {
// Prefer explicit transfer syntax
fieldValue += "; q=0.9";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to work in general? It looks somehow jpeg specific. Also, shouldn't it be something configurable by the user rather than hard-coded?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IMS responds with octet-stream when image/jpeg is available
2 participants