X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FApp.php;h=c80518c1922b66770975d3b51c7e20a326d8fa2f;hb=107cc6f297b8af88b2fd3d4b382e6cc80edfec69;hp=f3f7429db0651014ebe52aa4f6942024b81c7ddc;hpb=561aba18e3a230c0912ad9483c6df43cc40e09d6;p=friendica.git diff --git a/src/App.php b/src/App.php index f3f7429db0..c80518c192 100644 --- a/src/App.php +++ b/src/App.php @@ -24,6 +24,7 @@ namespace Friendica; use Exception; use Friendica\App\Arguments; use Friendica\App\BaseURL; +use Friendica\Capabilities\ICanCreateResponses; use Friendica\Core\Config\Factory\Config; use Friendica\Module\Maintenance; use Friendica\Security\Authentication; @@ -42,6 +43,7 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\HTTPSignature; use Friendica\Util\Profiler; use Friendica\Util\Strings; +use GuzzleHttp\Psr7\Response; use Psr\Log\LoggerInterface; /** @@ -702,7 +704,11 @@ class App // Let the module run it's internal process (init, get, post, ...) $response = $module->run($_POST, $_REQUEST); - $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig); + if ($response->getHeaderLine(ICanCreateResponses::X_HEADER) === ICanCreateResponses::TYPE_HTML) { + $page->run($this, $this->baseURL, $this->args, $this->mode, $response, $this->l10n, $this->profiler, $this->config, $pconfig); + } else { + $page->exit($response); + } } catch (HTTPException $e) { (new ModuleHTTPException())->rawContent($e); }