Skip to content

Commit

Permalink
feat: response dicom multipart when * accept
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinlinlee committed Mar 30, 2023
1 parent 48bcb0d commit 659c953
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/dicom-web/controller/WADO-RS/retrieveInstance.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class RetrieveInstanceOfSeriesOfStudiesController extends Controller {
return await this.responseZip();
} else if (this.request.headers.accept.includes("multipart/related")) {
return await this.responseMultipartRelated();
} else if (this.request.headers.accept.includes("*")){
this.request.headers.accept = "multipart/related; type=\"application/dicom\"";
return await this.responseMultipartRelated();
}

return wadoService.sendNotSupportedMediaType(this.response, this.request.headers.accept);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class RetrieveInstancesOfSeries extends Controller {
return await this.responseZip();
} else if (this.request.headers.accept.includes("multipart/related")) {
return await this.responseMultipartRelated();
} else if (this.request.headers.accept.includes("*")){
this.request.headers.accept = "multipart/related; type=\"application/dicom\"";
return await this.responseMultipartRelated();
}

return wadoService.sendNotSupportedMediaType(this.response, this.request.headers.accept);
Expand Down
3 changes: 3 additions & 0 deletions api/dicom-web/controller/WADO-RS/retrieveStudyInstances.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ class RetrieveStudyInstancesController extends Controller {
return await this.responseZip();
} else if (this.request.headers.accept.includes("multipart/related")) {
return await this.responseMultipartRelated();
} else if (this.request.headers.accept.includes("*")){
this.request.headers.accept = "multipart/related; type=\"application/dicom\"";
return await this.responseMultipartRelated();
}

return wadoService.sendNotSupportedMediaType(this.response, this.request.headers.accept);
Expand Down

0 comments on commit 659c953

Please sign in to comment.