fix: wado-rs retrieve metadata doesn't work with .NET servers #2969 (#2970)

* fix: wado-rs retrieve metadata doesn't work with .NET servers (issue #2969)

* add configuration to ommit the quots from multipart request
This commit is contained in:
Zaid Safadi authored and GitHub committed 2022-11-03 11:19:35 -04:00
1 parent 6698300ace
commit 6b1f9f35a8
1 file changed
+2 -2
@@ -52,7 +52,7 @@ export default function initWADOImageLoader(
// we should set this flag to false.
convertFloatPixelDataToInt: false,
},
beforeSend: function(xhr) {
beforeSend: function (xhr) {
const headers = UserAuthenticationService.getAuthorizationHeader();
// Request:
@@ -61,7 +61,7 @@ export default function initWADOImageLoader(
// For now we use image/jls and image/x-jls because some servers still use the old type
// http://dicom.nema.org/medical/dicom/current/output/html/part18.html
const xhrRequestHeaders = {
Accept: 'multipart/related; type=application/octet-stream',
Accept: (appConfig.ommitQuotationFromMultipartRequest) ? 'multipart/related; type=application/octet-stream' : 'multipart/related; type="application/octet-stream"'
// 'multipart/related; type="image/x-jls", multipart/related; type="image/jls"; transfer-syntax="1.2.840.10008.1.2.4.80", multipart/related; type="image/x-jls", multipart/related; type="application/octet-stream"; transfer-syntax=*',
};