Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/HttpOutput.cpp @ 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 | dca738d7846b |
children | f7adfb22e20e |
comparison
equal
deleted
inserted
replaced
5578:4bd7abdfb9cf | 5584:1b31ab38ea94 |
---|---|
426 } | 426 } |
427 | 427 |
428 | 428 |
429 void HttpOutput::Redirect(const std::string& path) | 429 void HttpOutput::Redirect(const std::string& path) |
430 { | 430 { |
431 /** | |
432 * "HttpStatus_301_MovedPermanently" was used in Orthanc <= | |
433 * 1.12.3. This caused issues on changes in the configuration of | |
434 * Orthanc. | |
435 **/ | |
431 stateMachine_.ClearHeaders(); | 436 stateMachine_.ClearHeaders(); |
432 stateMachine_.SetHttpStatus(HttpStatus_301_MovedPermanently); | 437 stateMachine_.SetHttpStatus(HttpStatus_307_TemporaryRedirect); |
433 stateMachine_.AddHeader("Location", path); | 438 stateMachine_.AddHeader("Location", path); |
434 stateMachine_.SendBody(NULL, 0); | 439 stateMachine_.SendBody(NULL, 0); |
435 } | 440 } |
436 | 441 |
437 | 442 |