[BitBucket user: Nick Farrell] [BitBucket date: 2020-06-26.02:47:06] While setting up orthanc, I have seen the C-ECHO fail, with the following logged: `HttpServer.cpp:824] POST /modalities/MYAET/echo` `OrthancException.h:86] Bad file format: Must provide a JSON object` With orimus docker versions 20.5.0 and 20.5.1, C-ECHO works as expected. Versions 20.5.2 and above fail. This was tested using docker compose with two peer orthanc instances, running the same version of the docker image. There were no special settings in orthanc.json. \(I am not sure whether this counts as a major or minor bug. While not impeding the flow of normal data it is a major headache when deploying and maintaining Orthanc instances, and may mask other errors.\)
Created attachment 17 [details] echo_bug.tar.gz
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2020-06-26.06:47:01] This is not a bug. Indeed, the error message indicates that you must provide a JSON object. Consider the following Orthanc configuration file: ``` { "DicomModalities" : { "self" : [ "ORTHANC", "localhost", 4242 ] } } ``` The following call would fail \(no JSON object provided in the body of the HTTP request\): ``` curl -v http://localhost:8042/modalities/self/echo -X POST -d '' ``` But the following call would success: ``` curl -v http://localhost:8042/modalities/self/echo -X POST -d '{}' ```
[BitBucket user: Nick Farrell] [BitBucket date: 2020-06-26.09:38:07] I get this error using the web interface, not the HTTP interface. Perhaps the web plugin does not supply the empty JSON payload when the button is pressed? If you cannot replicate this I can provide a docker compose setup which will allow you to do so yourself, manually. Rgards, Nick.
[BitBucket user: Nick Farrell] [BitBucket date: 2020-06-26.09:50:26]
[BitBucket user: Nick Farrell] [BitBucket date: 2020-06-26.09:51:45] If you untar the attached file and execute the dev script, you will see that the echo test to the adjacent orthanc instance fails, using the web interface on port 8042. Simply modify the anonymiser yaml’s image to 20.5.1 and it will work.
[BitBucket user: Nick Farrell] [BitBucket date: 2020-06-26.09:57:20] What you say above in your comment is partly correct. I do have an automated test below, and it works with 20.5.1 but not 20.5.2, possibly as it validates the json being POSTed. However, the web interface appears to not have been updated when this change was made. ```python def test_c_echo() -> None: post(segment="/modalities/TrafficControl/echo", hostname="anonymiser", data="") ```
[BitBucket user: Sébastien Jodogne] [BitBucket date: 2020-06-27.08:50:31] I thank you for your patience and for your explanations, and I confirm that there was indeed a bug in Orthanc Explorer. This is fixed by the following changeset, that will be part of forthcoming 1.7.2 release: https://hg.orthanc-server.com/orthanc/rev/ce7709cb380e