Repository navigation
Commit f8b9634
committed
General: Send correct HTTP statuses for db-error/maintenance drop-ins.
Updates the HTTP headers for sites running the `db-error.php` or `maintenance.php` drop-ins. Previously sites running these drop-ins would send a `200 OK` HTTP response by default if they were not specified by the drop-in. These have been updated to:
* `500 Internal Server Error` for the Database Error drop-in, matching the header sent by the default call to `wp_die().
* `503 Service Unavailable` for the maintenance mode drop-in with a retry header of 10 minutes, matching the headers sent by the default call to `wp_die()`.
Developers can continue to customize these headers by sending the headers in the drop-ins.
Developed in #13471.
Props bradleyt, dineshinau, sabernhardt, westonruter.
Fixes #66080.
git-svn-id: https://develop.svn.wordpress.org/trunk@64305 602fd350-edb4-49c9-b593-d223f7449a821 parent e0dd355 commit f8b9634
3 files changed
Lines changed: 17 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1959 | 1959 | | |
1960 | 1960 | | |
1961 | 1961 | | |
1962 | | - | |
| 1962 | + | |
| 1963 | + | |
1963 | 1964 | | |
1964 | 1965 | | |
1965 | 1966 | | |
| |||
2011 | 2012 | | |
2012 | 2013 | | |
2013 | 2014 | | |
2014 | | - | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
2015 | 2019 | | |
| 2020 | + | |
| 2021 | + | |
2016 | 2022 | | |
2017 | 2023 | | |
2018 | 2024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5663 | 5663 | | |
5664 | 5664 | | |
5665 | 5665 | | |
| 5666 | + | |
5666 | 5667 | | |
5667 | 5668 | | |
5668 | 5669 | | |
| |||
5675 | 5676 | | |
5676 | 5677 | | |
5677 | 5678 | | |
| 5679 | + | |
| 5680 | + | |
5678 | 5681 | | |
5679 | 5682 | | |
5680 | 5683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
| |||
403 | 404 | | |
404 | 405 | | |
405 | 406 | | |
| 407 | + | |
| 408 | + | |
406 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
407 | 413 | | |
408 | 414 | | |
409 | 415 | | |
410 | 416 | | |
411 | | - | |
412 | 417 | | |
413 | 418 | | |
414 | 419 | | |
| |||
0 commit comments