#23178Wrong HTTP headers sent when trying to access pages that require login
Description
When trying to access a login protected page while not being logged in it may happen that a wrong header is sent.
The install tool allows to set a header for the page not found handling: [FE][pageNotFound_handling_statheader]
The default value for this setting is “HTTP/1.0 404 Not Found“
In a case where access is denied because the user is not logged in, this is the wrong header of course, it should be 401 instead.
Proposed solution: In case where access is denied because of missing privileges, TYPO3 should ignore the mentioned setting and send a 401 instead.
(issue imported from #M15114)