Opened 16 years ago
Closed 16 years ago
#2971 closed defect (bug) (duplicate)
Errors are not returned with an HTTP error code.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.0.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
It looks like WordPress always returns an HTTP 200 status code, even when it is unable to process the request.
For example, if it cannot connect to the database it replies with a "HTTP/1.1 200 OK" saying "Error establishing a database connection", when it's obviously not OK since it could not fulfill the request. In this case, a 500 should be used since the server encountered an error.
Basically, errors should not be returned with an HTTP 200, which implies that the request was processed normally.
Regards,
Hugo
Change History (2)
Note: See
TracTickets for help on using
tickets.
HTTP errors are only for HTTP requests. A connection to a MySQL database is not done by a HTTP request. I understand your point, but the way WP behaves seems logical.