New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect HTTP status code when db has gone away #9758

Closed
jeabakker opened this Issue Apr 21, 2016 · 1 comment

Comments

Projects
None yet
3 participants
@jeabakker
Member

jeabakker commented Apr 21, 2016

When for some reason the connection to the database could not be established you get a generic error page with the HTTP status code 200 OK.

This should be something out of the 5xx range. https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error

at least there should be a status code 500 here
https://github.com/Elgg/Elgg/blob/1.12/engine/lib/elgglib.php#L852

but why don't i get the errors as defined here
https://github.com/Elgg/Elgg/blob/2.0/engine/classes/Elgg/Database.php#L171-L179

Using Elgg 2.0.3
steps to reproduce:

  • change you db username to a non-existing username (eg. add 'xxx')
@mrclay

This comment has been minimized.

Show comment
Hide comment
@mrclay
Member

mrclay commented Apr 21, 2016

PR #9760

@jdalsem jdalsem closed this Apr 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment