HTTP API: Add support for a description for HTTP status code 425 (Too Early).

Reference: [https://datatracker.ietf.org/doc/rfc8470/ RFC 8470: Using Early Data in HTTP].

Follow-up to [5446], [6104], [10740], [27422], [36274], [36294], [42207].

Props kkmuffme, mukesh27, joemcgill.
Fixes #60942.

git-svn-id: https://develop.svn.wordpress.org/trunk@57936 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2024-04-07 11:16:06 +00:00
parent f216440146
commit 3d2063c8f1
2 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,7 @@ class WP_Http {
const UNPROCESSABLE_ENTITY = 422;
const LOCKED = 423;
const FAILED_DEPENDENCY = 424;
const TOO_EARLY = 425;
const UPGRADE_REQUIRED = 426;
const PRECONDITION_REQUIRED = 428;
const TOO_MANY_REQUESTS = 429;

View File

@ -1347,6 +1347,7 @@ function wp( $query_vars = '' ) {
* @since 3.9.0 Added status codes 418, 428, 429, 431, and 511.
* @since 4.5.0 Added status codes 308, 421, and 451.
* @since 5.1.0 Added status code 103.
* @since 6.5.0 Added status code 425.
*
* @global array $wp_header_to_desc
*
@ -1408,6 +1409,7 @@ function get_status_header_desc( $code ) {
422 => 'Unprocessable Entity',
423 => 'Locked',
424 => 'Failed Dependency',
425 => 'Too Early',
426 => 'Upgrade Required',
428 => 'Precondition Required',
429 => 'Too Many Requests',