The default MyBB forum/thread/user not found/does not exist pages return HTTP status code 200 (success) currently. I think that PHP's http_response_code function should be used and make those pages return the correct HTTP 404 status code.
Could this be extended to make the 'no permissions' error page return a status code of 403 (forbidden) or 401 (unauthorised)?
Original thread: Return correct HTTP status codes
http_response_code was introduced in PHP 5.4.0 so the minimum requirements would need to be bumped from PHP >= 5.2.
We can also use header to set a status code too, which is backwards compatible. We'd have a my_http_response_code() function to decide which to use.
Euan, this should be moved to 1.9? @euantorano
Yep
On 9 Jun 2018, at 19:50, Ben notifications@github.com wrote:
Euan, this should be moved to 1.9? @euantorano
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Most helpful comment
We can also use
headerto set a status code too, which is backwards compatible. We'd have amy_http_response_code()function to decide which to use.