Bug 196 - STOW-RS: Should return 200 only when "The origin server successfully stored all Instances."
Summary: STOW-RS: Should return 200 only when "The origin server successfully stored a...
Status: RESOLVED FIXED
Alias: None
Product: Orthanc
Classification: Unclassified
Component: Plugin - DICOMweb (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- enhancement
Assignee: Sébastien Jodogne
URL:
Depends on:
Blocks:
 
Reported: 2021-03-19 13:36 CET by Mathieu Malaterre
Modified: 2021-05-05 19:03 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mathieu Malaterre 2021-03-19 13:36:05 CET
It seems the server is sending back a 200 response even when the DICOM file could not be stored (DICOM Study Instance UID does not match STOW-RS request):

$ curl -u orthanc:orthanc -X POST "http://acme.corp:8042/dicom-web/studies/1.3.12.2.1107.5.2.4.7630.20010301123617000" --header 'Content-Type: multipart/related; type="application/dicom"' --form "file=@tt.dcm;type=application/dicom" --trace-ascii bla.txt -v
Warning: -v, --verbose overrides an earlier trace/verbose option
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 10.37.0.26:8042...
* TCP_NODELAY set
* Connected to acme.corp (1.2.3.4) port 8042 (#0)
* Server auth using Basic with user 'orthanc'
> POST /dicom-web/studies/1.3.12.2.1107.5.2.4.7630.20010301123617000 HTTP/1.1
> Host: acme.corp:8042
> Authorization: Basic b3J0aGFuYzpvcnRoYW5j
> User-Agent: curl/7.68.0
> Accept: */*
> Content-Length: 65478
> Content-Type: multipart/related; type="application/dicom"; boundary=------------------------b25eaebf2b64fc9c
> Expect: 100-continue
>
* Done waiting for 100-continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Connection: keep-alive
< Keep-Alive: timeout=1
< Content-Type: application/dicom+json
< Content-Length: 163
<
{
   "00080005" : {
      "Value" : [ "ISO_IR 100" ],
      "vr" : "CS"
   },
   "00081198" : {
      "vr" : "SQ"
   },
   "00081199" : {
      "vr" : "SQ"
   }
}
* Connection #0 to host acme.corp left intact
Comment 1 Sébastien Jodogne 2021-05-05 19:03:08 CEST
Thanks for the report! This is fixed by the following changeset that will be part of release 1.6 of the DICOMweb plugin:
https://hg.orthanc-server.com/orthanc-dicomweb/rev/a9d773afdbc6


With this fix, here is the result of your command:

$ curl -u orthanc:orthanc -X POST "http://localhost:8042/dicom-web/studies/1.3.12.2.1107.5.2.4.7630.20010301123617000" --header 'Content-Type: multipart/related; type="application/dicom"' --form "file=@tt.dcm;type=application/dicom" -v
[...]
< HTTP/1.1 409 Conflict
[...]


This is the 409 error code, as specified in the standard:
http://dicom.nema.org/medical/dicom/2021a/output/html/part18.html#table_10.5.3-1