Mercurial > hg > orthanc
changeset 2724:c8d369400ae1 jobs
fix issue #77
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 12 Jul 2018 15:54:37 +0200 |
parents | c1e351b6abec |
children | 7caf01aa4d7b |
files | Core/Lua/LuaContext.cpp NEWS |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/Core/Lua/LuaContext.cpp Thu Jul 12 15:11:42 2018 +0200 +++ b/Core/Lua/LuaContext.cpp Thu Jul 12 15:54:37 2018 +0200 @@ -287,7 +287,17 @@ if (nArgs >= 2 && !lua_isnil(state, 2)) { - that.httpClient_.SetBody(lua_tostring(state, 2)); + size_t bodySize = 0; + const char* bodyData = lua_tolstring(state, 2, &bodySize); + + if (bodySize == 0) + { + that.httpClient_.GetBody().clear(); + } + else + { + that.httpClient_.GetBody().assign(bodyData, bodySize); + } } else {
--- a/NEWS Thu Jul 12 15:11:42 2018 +0200 +++ b/NEWS Thu Jul 12 15:54:37 2018 +0200 @@ -45,11 +45,12 @@ Maintenance ----------- +* Configuration option "LogExportedResources" is now "false" by default +* Header "OrthancCppDatabasePlugin.h" is now part of the "orthanc-databases" project * Fix generation of DICOMDIR if PatientID is empty * Fix issue 25 (Deadlock with Lua scripts): The event queue is now implemented for Lua * Fix issue 94 (Instance modification should not modify FrameOfReferenceUID) -* Configuration option "LogExportedResources" is now "false" by default -* Header "OrthancCppDatabasePlugin.h" is now part of the "orthanc-databases" project +* Fix issue 77 (Lua access to REST-API is null terminated) * Upgraded dependencies for static and Windows builds: - boost 1.67.0 - openssl 1.0.2o