Code Monkey home page Code Monkey logo

Comments (5)

hackermd avatar hackermd commented on June 7, 2024

Thanks for reporting the issue @HannoGao. Since version 0.5.0 the client uses chunked transfer encoding for the Store transaction by default. The transfer is part of HTTP 1.1 and according to RFC 2730 every server must support it:

A recipient MUST be able to parse and decode the chunked transfer
coding.

However, orthanc may struggle with handling these messages correctly. What does your server log say?

You can try disabling chunked transfer encoding by choosing a large chunk_size that is guaranteed to be larger than the payloads you are sending. The client will then send everything in one message without chunked transfer encoding.

from dicomweb-client.

HannoGao avatar HannoGao commented on June 7, 2024

Thanks for the response.
I tried to increase the chunk_size, but this does not seem to be the problem. I am just trying to send one file with less than 200 kB.
The Orthanc server logs, just show, that it cannot handle the data:
When sending with 0.41.2:

I1123 11:09:29.376022 HttpServer.cpp:1165] POST /dicom-web/studies
I1123 11:09:29.376099 OrthancPlugins.cpp:5127] Delegating chunked HTTP request to plugin for URI: /dicom-web/studies
I1123 11:09:29.376136 PluginsManager.cpp:172] STOW-RS request without study
I1123 11:09:29.380303 OrthancPlugins.cpp:2455] Plugin making REST POST call on URI /instances (built-in API)
I1123 11:09:29.380346 OrthancRestApi.cpp:116] Receiving a DICOM file of 197990 bytes through HTTP
I1123 11:09:29.388075 FilesystemStorage.cpp:107] Creating attachment "db21c413-e473-4219-95e1-b49400d11978" of "DICOM" type (size: 1MB)
I1123 11:09:29.393730 FilesystemStorage.cpp:107] Creating attachment "513d6b4a-a90d-4e08-a277-a4cab03d8f57" of "JSON summary of DICOM" type (size: 1MB)
I1123 11:09:29.397064 ServerContext.cpp:512] New instance stored

With 0.50.3:

I1123 11:11:19.457871 HttpServer.cpp:1165] POST /dicom-web/studies
I1123 11:11:19.457935 OrthancPlugins.cpp:5127] Delegating chunked HTTP request to plugin for URI: /dicom-web/studies
I1123 11:11:19.457970 PluginsManager.cpp:172] STOW-RS request without study

The log just ends there. Orthanc source code seems to not get the data anymore.
So basically I am not sure if this is an Orthanc issue or related to this package.

from dicomweb-client.

hackermd avatar hackermd commented on June 7, 2024

@HannoGao thanks for sharing the logs and providing additional details. Unfortunately, the logs are not really helpful.

I have a suspicion, though. It appears Orthanc doesn't deal with the quotes in the type and boundary fields in the Content-Type header (see RFC 2387 and REF 1341 Section 7.2).

This is how a Content-Type header looks like for a POST request message of the DICOMweb client:

'multipart/related; type="application/dicom"; boundary="0f3cf5c0-70e0-41ef-baef-c6f9f65ec3e1"'

from dicomweb-client.

jodogne avatar jodogne commented on June 7, 2024

Hello, thanks for the report and for the analysis. This was indeed a bug in the DICOMweb plugin of Orthanc, which has been fixed by the following changeset. The fix will be part of forthcoming release 1.4 of the plugin.

The Docker images of Orthanc have just been updated with this fix, you can give another try with:

$ docker pull jodogne/orthanc-plugins:latest
$ docker run -p 4242:4242 -p 8042:8042 --rm -t -i jodogne/orthanc-plugins:latest

from dicomweb-client.

hackermd avatar hackermd commented on June 7, 2024

Thanks for your feedback @jodogne. Great that this has been fixed in the DICOMweb plugin of Orthanc.

from dicomweb-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.