summaryrefslogtreecommitdiffstats
path: root/public.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-06-26 10:32:50 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-06-26 16:14:15 +0200
commit79d9841bce94c0e9abf5e53c845236296a8999de (patch)
treeb676ba133dbf68ad0d64ba21bf192bdb4308294a /public.php
parentd9d557a5ef31d63a8807feac1c530c36a077607f (diff)
downloadnextcloud-server-79d9841bce94c0e9abf5e53c845236296a8999de.tar.gz
nextcloud-server-79d9841bce94c0e9abf5e53c845236296a8999de.zip
Replace hardcoded status headers with calls to http_response_code()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'public.php')
-rw-r--r--public.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/public.php b/public.php
index c81a6b5a960..5d46f4970dc 100644
--- a/public.php
+++ b/public.php
@@ -45,7 +45,7 @@ try {
$pathInfo = $request->getPathInfo();
if (!$pathInfo && $request->getParam('service', '') === '') {
- header('HTTP/1.0 404 Not Found');
+ http_response_code(404);
exit;
} elseif ($request->getParam('service', '')) {
$service = $request->getParam('service', '');
@@ -55,7 +55,7 @@ try {
}
$file = \OC::$server->getConfig()->getAppValue('core', 'public_' . strip_tags($service));
if ($file === null) {
- header('HTTP/1.0 404 Not Found');
+ http_response_code(404);
exit;
}