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

Add support for DICOMweb range requests #1444

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

psavery
Copy link
Collaborator

@psavery psavery commented Jan 25, 2024

When a range request is made or a fuse mount is attempted, we compute the size of the DICOM file. Currently, the only reliable way that we know to do this is by streaming the whole file and counting the bytes read.

After the file size is computed, it is stored in file['size'] so it does not need to be computed again. Then, the range requests can be successfully made, complete with accurate Content-Length and Content-Range headers.

@psavery psavery force-pushed the dicomweb-range-requests branch 3 times, most recently from 20b7406 to b18de4f Compare January 25, 2024 22:26
When a range request is made or a fuse mount is attempted, we compute the
size of the DICOM file. Currently, the only reliable way that we know to do
this is by streaming the whole file and counting the total bytes read.

After the file size is computed, it is saved in `file['size']` so it does not
need to be computed again. Then, the range requests can be successfully made,
complete with accurate `Content-Length` and `Content-Range` headers.

Signed-off-by: Patrick Avery <[email protected]>
@psavery psavery force-pushed the dicomweb-range-requests branch from b18de4f to 4760bda Compare January 26, 2024 16:28
@psavery psavery merged commit 2f41f81 into girder:master Jan 29, 2024
14 checks passed
@psavery psavery deleted the dicomweb-range-requests branch January 29, 2024 15:50
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.

2 participants