# HG changeset patch # User Sebastien Jodogne # Date 1607621817 -3600 # Node ID 189e48f4a92abe7a3fa3c10faf20ad0bd50793af # Parent 6a39ca7083b9f22e024db4be002eaf675f86cf64 Allow empty request body in "/modalities/{id}/echo" diff -r 6a39ca7083b9 -r 189e48f4a92a NEWS --- a/NEWS Thu Dec 10 09:32:39 2020 +0100 +++ b/NEWS Thu Dec 10 18:36:57 2020 +0100 @@ -16,6 +16,7 @@ ----------- * Allow concurrency on the OrthancPluginRegisterIncomingHttpRequestFilter() callbacks +* Allow empty request body in "/modalities/{id}/echo" Version 1.8.1 (2020-12-07) diff -r 6a39ca7083b9 -r 189e48f4a92a OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp --- a/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Dec 10 09:32:39 2020 +0100 +++ b/OrthancServer/Sources/OrthancRestApi/OrthancRestModalities.cpp Thu Dec 10 18:36:57 2020 +0100 @@ -162,8 +162,10 @@ static void DicomEcho(RestApiPostCall& call) { - Json::Value body; - if (call.ParseJsonRequest(body)) + Json::Value body = Json::objectValue; + + if (call.GetBodySize() == 0 /* allow empty body, was disallowed in Orthanc 1.7.0->1.8.1 */ || + call.ParseJsonRequest(body)) { const DicomAssociationParameters parameters = GetAssociationParameters(call, body); ExecuteEcho(call.GetOutput(), parameters, body);