X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModule.php;h=d9c7da97a7b8d3c6b30a97f682d51f1598aaf34e;hb=493e4ed9fb24ab82632e0aac1214c33362e793b4;hp=09107f04722c6a66754a706f73be772ce5a8193f;hpb=ab9b60b9d22306d4e52648c582f3b2dd5d2cc120;p=friendica.git diff --git a/src/BaseModule.php b/src/BaseModule.php index 09107f0472..d9c7da97a7 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -1,6 +1,6 @@ args->getQueryString(), 0, 12) == '.well-known/') { @@ -243,7 +243,15 @@ abstract class BaseModule implements ICanHandleRequests $this->response->addContent($arr['content']); $this->response->addContent($this->content($request)); } catch (HTTPException $e) { - $this->response->addContent((new ModuleHTTPException())->content($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'); }