STOW-RS fails while adding Content-type=multipart/related; type=application/dicom; boundary=

332 views
Skip to first unread message

rekha.ni...@gmail.com

unread,
Feb 19, 2021, 4:53:41 AM2/19/21
to Orthanc Users
Hi 
I am trying to do STOW-RS (to upload dcm file) with Orthanc.
Able to upload if content type is "multipart/related; boundary="

But it fails while changing content-type header as per dicom web standard(http://dicom.nema.org/dicom/2013/output/chtml/part18/sect_6.6.html) as "multipart/related; type=application/dicom; boundary=----someText". 
What else headers need to be set here ?
Error:

T0219 12:27:40.827197 HttpServer.cpp:732] HTTP header: [content-type]: [multipart/related; type=application/dicom; boundary=-------someText]

T0219 12:27:40.827211 HttpServer.cpp:732] HTTP header: [mime-version]: [1.0]

T0219 12:27:40.827221 HttpServer.cpp:732] HTTP header: [content-length]: [132142]

T0219 12:27:40.827231 HttpServer.cpp:732] HTTP header: [connection]: [Keep-Alive]

T0219 12:27:40.827243 HttpServer.cpp:732] HTTP header: [accept-encoding]: [gzip, deflate]

T0219 12:27:40.827255 HttpServer.cpp:732] HTTP header: [accept-language]: [en-IN,*]

T0219 12:27:40.827266 HttpServer.cpp:732] HTTP header: [user-agent]: [Mozilla/5.0]

I0219 12:27:40.827291 HttpServer.cpp:817] POST /instances

I0219 12:27:40.827724 OrthancRestApi.cpp:116] Receiving a DICOM file of 132142 bytes through HTTP

W: DcmItem: Length of element (2d2d,2d2d) is odd

E: DcmElement: Unknown Tag & Data (2d2d,2d2d) larger (757935405) than remaining bytes (132134) in file, premature end of stream


Thanks & Regards,

Rekha Devi


rekha.ni...@gmail.com

unread,
Feb 19, 2021, 8:21:19 AM2/19/21
to Orthanc Users
Correcting content-type in working case:
content type is "multipart/form-data; boundary="

On Friday, February 19, 2021 at 3:23:41 PM UTC+5:30 rekha.ni...@gmail.com wrote:
Hi 
I am trying to do STOW-RS (to upload dcm file) with Orthanc.
Able to upload if content type is "multipart/form-data; boundary=-----Some text"

Sébastien Jodogne

unread,
Feb 20, 2021, 4:43:21 AM2/20/21
to Orthanc Users
Hello,

You are most likely confusing the URI for DICOMweb with the URI for the custom REST API of Orthanc.

"http://localhost:8042/instances" => this is the REST API of Orthanc, which accepts "multipart/form-data" or a plain DICOM file:

"http://localhost:8042/dicom-web/studies" => this is the DICOMweb API, which only accepts "multipart/related", as described in your link to the DICOM standard:

Sébastien-
Reply all
Reply to author
Forward
0 new messages