XF 2.1 Error 503

frm

Well-known member
Upgraded from 2.1.4 after 2.1.2 when it was fixed this with the code at the bottom of config.php and still receiving an error 503.
A no permission page doesn't give a 503, because that would be an inappropriate response code. No permission gives a 403 "Forbidden" or 401 "Unauthorized" response. It's a bit of a strawman argument.

We still 100% stand by the fact that 503 is correct. The "service" is your forum and there are certain times where that becomes "unavailable" temporarily. That is what the 503 response is for.

200 seems wholly inappropriate for a number of reasons. 200 is "success" and a site that isn't functioning fully is hardly a successful request. Pretty sure there could be an element of a 200 response being a success being cached and returned to users, potentially long after the site has fully opened again.

That said, we're open to compromise. The only workable way I can see to compromise right now is to make the "service unavailable" response code to be configurable. We still default it to 503, but you could override it in src/config.php to something more compatible with whichever systems you have in place.

PHP:
$config['serviceUnavailableCode'] = 200;

Would that work for everyone?

Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.3).

Change log:

Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom