X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModule.php;h=11f884472e65c448c774d6b8f1576ef986903bac;hb=fefe9cd5c918f71c374ffbc43049a5cf7f94c475;hp=12efbce81170b476918e9a922453f37aa179db24;hpb=5c332af844eeace5d0fb61314dd29c22e6e465fd;p=friendica.git diff --git a/src/BaseModule.php b/src/BaseModule.php index 12efbce811..11f884472e 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -243,6 +243,14 @@ abstract class BaseModule implements ICanHandleRequests $this->response->addContent($arr['content']); $this->response->addContent($this->content($request)); } catch (HTTPException $e) { + // In case of System::externalRedirects(), we don't want to prettyprint the exception + // just redirect to the new location + if (($e instanceof HTTPException\FoundException) || + ($e instanceof HTTPException\MovedPermanentlyException) || + ($e instanceof HTTPException\TemporaryRedirectException)) { + throw $e; + } + $this->response->addContent($httpException->content($e)); } finally { $this->profiler->set(microtime(true) - $timestamp, 'content');