changeset 5584:1b31ab38ea94

using HttpStatus_307_TemporaryRedirect for redirections
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 May 2024 10:26:55 +0200
parents 4bd7abdfb9cf
children 5df6d2a8d9f2
files OrthancFramework/Sources/HttpServer/HttpOutput.cpp
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpOutput.cpp	Fri Apr 26 18:05:00 2024 +0200
+++ b/OrthancFramework/Sources/HttpServer/HttpOutput.cpp	Fri May 03 10:26:55 2024 +0200
@@ -428,8 +428,13 @@
 
   void HttpOutput::Redirect(const std::string& path)
   {
+    /**
+     * "HttpStatus_301_MovedPermanently" was used in Orthanc <=
+     * 1.12.3. This caused issues on changes in the configuration of
+     * Orthanc.
+     **/
     stateMachine_.ClearHeaders();
-    stateMachine_.SetHttpStatus(HttpStatus_301_MovedPermanently);
+    stateMachine_.SetHttpStatus(HttpStatus_307_TemporaryRedirect);
     stateMachine_.AddHeader("Location", path);
     stateMachine_.SendBody(NULL, 0);
   }