dicomweb-client-fixes #80

Merged
christof.schadt merged 7 commits from dicomweb-client-fixes into main 2026-10-21 12:50:23 +02:00
Owner
No description provided.
christof.schadt added this to the 26.10.0 milestone 2026-10-21 12:50:10 +02:00
The DICOMweb client had no connect or read timeout, so a backend that
accepted the connection and stopped answering held the operation and its
pool slot forever. Connect now gives up after 10 s, and a server may stay
silent for at most 120 s - until its headers, then between body chunks -
so long retrieves still run as long as data flows. A timeout surfaces as
BackendTimeout (504 at the frontend).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PS3.18 allows a server to answer a query without matches with
204 No Content, and some answer 200 with an empty body. Both were parsed
as JSON and failed the C-FIND with "Invalid QIDO-RS JSON response".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: accept a bare application/dicom WADO-RS answer
All checks were successful
CI / build-and-test (push) Successful in 12m6s
ec1075ec56
Some servers answer a single-instance retrieve with a plain
application/dicom body even when multipart was asked for; the gateway
failed it with "No multipart boundary". Such a body is now taken as the
one part. The boundary parameter is also found case-insensitively and
with whitespace around "=", as RFC 2045 allows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a TLS client certificate configured, the backend client followed
redirects to any host and presented the certificate there. Such a client
now follows redirects only within the backend's host; a redirect that
leaves it fails the request with its 3xx.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The comments claimed retrieved instances arrive in their original
transfer syntax. Without transfer-syntax=* in the Accept a compliant
server sends Explicit VR Little Endian, decompressing pixel data. Keep
it that way - the gateway cannot decompress pixel data, so asking for
the stored syntax would break SCUs that accept only uncompressed
syntaxes - and say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A backend's /metadata may give relative BulkDataURIs. The JSON retrieve
resolved them against base_url instead of the URL that answered, and the
gateway's own /metadata passed them on unchanged, so its clients resolved
them against the gateway. WadoClient::metadata now makes them absolute
against the answering URL, after which the existing relay rewrite applies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: retry STOW-RS uploads and let large ones run alone
All checks were successful
CI / build-and-test (push) Successful in 12m9s
c5b1ca7406
A STOW-RS POST was sent exactly once: its streamed body cannot be
cloned, so the GET retry did not apply. It is now rebuilt per attempt
and sent again - up to three retries - on 503/429 (honouring
Retry-After) and when the request got no answer without timing out,
typically a pooled keep-alive connection the server had closed.
Re-sending a store is safe; a duplicate SOP Instance UID is just a
duplicate.

Uploads of 8 MiB or more now take a backend's STOW-RS to themselves,
as dicom-browser's StoreGate does: a large upload keeps the bottleneck
queue full, and small requests beside it lose bursts and fall onto
TCP's retransmission timer (a 20 KB POST was measured taking 63 s).
The wait shows as pool time in the Performance tab.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
christof.schadt deleted branch dicomweb-client-fixes 2026-10-21 12:50:23 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
IHE-RO-Tooling/dicom-gateway!80
No description provided.