Mercurial > hg > orthanc
changeset 4326:83c5bd439fcc
fix for stone
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 24 Nov 2020 19:43:10 +0100 |
parents | b96aedfa8cc1 |
children | 9684a690ca63 |
files | OrthancFramework/Sources/HttpServer/HttpToolbox.cpp OrthancFramework/Sources/HttpServer/HttpToolbox.h OrthancFramework/UnitTestsSources/RestApiTests.cpp OrthancServer/Resources/RunCppCheck.sh |
diffstat | 4 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpToolbox.cpp Tue Nov 24 16:21:29 2020 +0100 +++ b/OrthancFramework/Sources/HttpServer/HttpToolbox.cpp Tue Nov 24 19:43:10 2020 +0100 @@ -188,6 +188,7 @@ } +#if ORTHANC_SANDBOXED != 1 bool HttpToolbox::SimpleGet(std::string& result, IHttpHandler& handler, RequestOrigin origin, @@ -212,8 +213,10 @@ return false; } } +#endif +#if ORTHANC_SANDBOXED != 1 static bool SimplePostOrPut(std::string& result, IHttpHandler& handler, RequestOrigin origin, @@ -242,8 +245,10 @@ return false; } } +#endif +#if ORTHANC_SANDBOXED != 1 bool HttpToolbox::SimplePost(std::string& result, IHttpHandler& handler, RequestOrigin origin, @@ -254,8 +259,10 @@ { return SimplePostOrPut(result, handler, origin, HttpMethod_Post, uri, bodyData, bodySize, httpHeaders); } +#endif +#if ORTHANC_SANDBOXED != 1 bool HttpToolbox::SimplePut(std::string& result, IHttpHandler& handler, RequestOrigin origin, @@ -266,8 +273,10 @@ { return SimplePostOrPut(result, handler, origin, HttpMethod_Put, uri, bodyData, bodySize, httpHeaders); } +#endif + - +#if ORTHANC_SANDBOXED != 1 bool HttpToolbox::SimpleDelete(IHttpHandler& handler, RequestOrigin origin, const std::string& uri, @@ -284,4 +293,5 @@ return handler.Handle(http, origin, LOCALHOST, "", HttpMethod_Delete, curi, httpHeaders, getArguments, NULL /* no body for DELETE */, 0); } +#endif }
--- a/OrthancFramework/Sources/HttpServer/HttpToolbox.h Tue Nov 24 16:21:29 2020 +0100 +++ b/OrthancFramework/Sources/HttpServer/HttpToolbox.h Tue Nov 24 19:43:10 2020 +0100 @@ -22,6 +22,10 @@ #pragma once +#if !defined(ORTHANC_SANDBOXED) +# error Macro ORTHANC_SANDBOXED must be defined +#endif + #include "../OrthancFramework.h" #include "IHttpHandler.h" @@ -51,6 +55,7 @@ static void CompileGetArguments(IHttpHandler::Arguments& compiled, const IHttpHandler::GetArguments& source); +#if ORTHANC_SANDBOXED != 1 static bool SimpleGet(std::string& result, IHttpHandler& handler, RequestOrigin origin, @@ -77,5 +82,6 @@ RequestOrigin origin, const std::string& uri, const IHttpHandler::Arguments& httpHeaders); +#endif }; }
--- a/OrthancFramework/UnitTestsSources/RestApiTests.cpp Tue Nov 24 16:21:29 2020 +0100 +++ b/OrthancFramework/UnitTestsSources/RestApiTests.cpp Tue Nov 24 19:43:10 2020 +0100 @@ -208,6 +208,7 @@ ASSERT_EQ("v", cookies["n"]); } + TEST(RestApi, RestApiPath) { IHttpHandler::Arguments args;
--- a/OrthancServer/Resources/RunCppCheck.sh Tue Nov 24 16:21:29 2020 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Tue Nov 24 19:43:10 2020 +0100 @@ -12,7 +12,7 @@ constParameter:../../OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp knownArgument:../../OrthancFramework/UnitTestsSources/ImageTests.cpp knownConditionTrueFalse:../../OrthancServer/Plugins/Engine/OrthancPlugins.cpp -nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:309 +nullPointer:../../OrthancFramework/UnitTestsSources/RestApiTests.cpp:314 nullPointerRedundantCheck:../../OrthancFramework/UnitTestsSources/DicomMapTests.cpp stlFindInsert:../../OrthancFramework/Sources/DicomFormat/DicomMap.cpp:1163 stlFindInsert:../../OrthancServer/Sources/OrthancWebDav.cpp:383