Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] requestTransferSyntaxUID config param no longer works after upgrading from v3.7.0 to v3.8.x #4369

Open
whage opened this issue Sep 12, 2024 · 0 comments
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@whage
Copy link

whage commented Sep 12, 2024

Describe the Bug

We are upgrading from v3.7.0 to v3.8.x and noticed that OHIF sends the transfer-syntax twice in the Accept HTTP header
when it downloads image data:

multipart/related; type="image/jpeg"; transfer-syntax="1.2.840.10008.1.2.4.70"; transfer-syntax="*"

Our related configuration:

dataSources: [
    {
      friendlyName: 'Orthanc',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        ...
        requestTransferSyntaxUID: '1.2.840.10008.1.2.4.70',
        ...
      },
    }
],

I think I found the relevant change and it was even pointed out in the PR that it might cause issues:
https://github.com/OHIF/Viewers/pull/3883/files#r1446325019
I don't yet understand how other changes in the PR resolve this issue.

If I use the acceptHeader config param instead, like so:

dataSources: [
    {
      friendlyName: 'Orthanc',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        ...
        acceptHeader: ['multipart/related; type=image/jpeg; transfer-syntax=1.2.840.10008.1.2.4.70'],
        ...
      },
    }
],

then it seems to work fine, but this is not right, because type depends on the value of transfer-syntax and we shouldn't
be duplicating this logic for setting the acceptHeader.
All in all, it seems like requestTransferSyntaxUID can no longer be used on its own. Would you agree?

I think the right solution would be to remove the unconditional acceptHeader.push('transfer-syntax=*');.
What do the maintainers think?

The documentation on requestTransferSyntaxUID should also be updated I think:
https://github.com/OHIF/Viewers/blob/v3.8.3/platform/docs/docs/configuration/configurationFiles.md?plain=1#L128

Thanks a lot, looking forward to your feedback.

Steps to Reproduce

Try viewing any DICOM image with the above config setting

The current behavior

A transfer-syntax="*" is always appended to the Accept header regardless of the requestTransferSyntaxUID setting in the config file.

The expected behavior

There should be only one transfer-syntax in the Accept header and it should be the one set as requestTransferSyntaxUID in the config file.

OS

ubuntu

Node version

18.16.1

Browser

Version 123.0.6312.86 (Official Build) (64-bit)

@whage whage added the Awaiting Reproduction Can we reproduce the reported bug? label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

No branches or pull requests

1 participant