]> git.mxchange.org Git - friendica.git/blobdiff - src/App/Module.php
Merge pull request #10953 from annando/bott-shrinked
[friendica.git] / src / App / Module.php
index cea2788edd87748d420637e41f3616538d0924eb..5b7c3d15007bb11c995ae001f43027d87c1de708 100644 (file)
@@ -30,6 +30,7 @@ use Friendica\Module\Home;
 use Friendica\Module\HTTPException\MethodNotAllowed;
 use Friendica\Module\HTTPException\PageNotFound;
 use Friendica\Network\HTTPException\MethodNotAllowedException;
+use Friendica\Network\HTTPException\NoContentException;
 use Friendica\Network\HTTPException\NotFoundException;
 use Friendica\Util\Profiler;
 use Psr\Log\LoggerInterface;
@@ -292,9 +293,8 @@ class Module
                // @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/OPTIONS
                // @todo Check allowed methods per requested path
                if ($server['REQUEST_METHOD'] === Router::OPTIONS) {
-                       header('HTTP/1.1 204 No Content');
                        header('Allow: ' . implode(',', Router::ALLOWED_METHODS));
-                       exit();
+                       throw new NoContentException();
                }
 
                $placeholder = '';