where HTTP_STATUS_LOGIN_TIMEOUT is defined as 440 and the object is an instance of \Laminas\Mvc\Controller\AbstractRestfulController. However, I always get a 500 in HTTP response. There are no exceptions in error logs. I tried with other code such as 444 or 401, it works as expected, what ever code I set is properly returned. Could someone please help?
As an update I can resolve this by adding 440 to vendor/laminas/laminas-http/src/Response.php. Ideally, we can have this file updated in the next release. Or is there a way I can create a PR?
You can create a PR on GitHub. Since 440 is an unofficial HTTP status code, I do not see any chance of success.
Do not edit the vendor package. Never ever do this! Have you tried Laminas\Http\PhpEnvironment\Response::setCustomStatusCode() and Laminas\Http\PhpEnvironment\Response::setReasonPhrase() already?