When inspecting the HTTP responses of the DicomWeb Plugin I found the plugin to respond with close delimited HTTP entities.
Is there a specific reason why you do not send a “Content-Length” header or using chunked entities?
Wouldn’t this enable more efficient use of resources like memory and re-using connections?
Felix
GET /dicom-web/studies/1.2.3/series/1.3.3/instances/1.3.3 HTTP/1.1
Host: localhost:8042
Authorization: Basic ZmVTpnZhuuH5zYhWsaXlaW0xMjM=
User-Agent: curl/7.52.1
Accept: /
< HTTP/1.1 200 OK
< Content-Type: multipart/related; type=application/dicom; boundary=5217EE14-94A0-4C25-AF11-14547AEC301E
no chunk, no close, no size. Assume close to signal end
jodogne
November 29, 2018, 4:29pm
2
Hello,
The “Content-Length” HTTP header is not set in multipart answers, as the size of the individual parts is unknown in advance.
Sébastien-
Hi Sébastien, I see. Thanks for the explanation.
One more thing related to the header.
Wouldn’t it per https://tools.ietf.org/html/rfc2387#page-5 be correct to put the type parameter in double quotes?
If I consume the response of the DicomWeb plugin with akka-http, it gives a respective error.
I think it should be:
Content-Type: multipart/related; type=“application/dicom ” ; boundary=5217EE14-94A0-4C25-AF11-14547AEC301E
Correct?
jodogne
November 29, 2018, 6:44pm
4
Hello,
Indeed, this has been fixed by the following changeset that is pending in the mainline, and that will be part of forthcoming Orthanc 1.4.3:
https://bitbucket.org/sjodogne/orthanc/commits/e02af4ca8003b1b5a80071a4b7c83ec6f1af23d7
Sébastien-