Mercurial > hg > orthanc-stone
diff Framework/Oracle/GenericOracleRunner.cpp @ 1254:7a0460c5e98e broker
don't follow redirections if contacting the Orthanc REST API
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 08 Jan 2020 14:01:36 +0100 |
parents | 113131100638 |
children | 0ca50d275b9a |
line wrap: on
line diff
--- a/Framework/Oracle/GenericOracleRunner.cpp Wed Jan 08 10:35:39 2020 +0100 +++ b/Framework/Oracle/GenericOracleRunner.cpp Wed Jan 08 14:01:36 2020 +0100 @@ -152,6 +152,7 @@ const OrthancRestApiCommand& command) { Orthanc::HttpClient client(orthanc, command.GetUri()); + client.SetRedirectionFollowed(false); client.SetMethod(command.GetMethod()); client.SetTimeout(command.GetTimeout()); @@ -188,6 +189,7 @@ const GetOrthancImageCommand& command) { Orthanc::HttpClient client(orthanc, command.GetUri()); + client.SetRedirectionFollowed(false); client.SetTimeout(command.GetTimeout()); CopyHttpHeaders(client, command.GetHttpHeaders()); @@ -208,6 +210,7 @@ const GetOrthancWebViewerJpegCommand& command) { Orthanc::HttpClient client(orthanc, command.GetUri()); + client.SetRedirectionFollowed(false); client.SetTimeout(command.GetTimeout()); CopyHttpHeaders(client, command.GetHttpHeaders());