rfc7033 compliance changes (expected HTML error code for two error conditions unintentionally reversed)

This commit is contained in:
Mike Macgirvin 2024-06-06 05:42:04 +10:00
parent 77dd76a5af
commit 198326d2c1

View file

@ -39,7 +39,7 @@ class Webfinger extends Controller
$resource = $_REQUEST['resource'];
if (!$resource) {
http_status_exit(404, 'Not found');
http_status_exit(400, 'Bad request');
}
logger('webfinger: ' . $resource, LOGGER_DEBUG);
@ -205,7 +205,7 @@ class Webfinger extends Controller
}
if (!$result) {
header($_SERVER['SERVER_PROTOCOL'] . ' ' . 400 . ' ' . 'Bad Request');
header($_SERVER['SERVER_PROTOCOL'] . ' ' . 404 . ' ' . 'Not found');
killme();
}