From 70e045910bd0478b580e8773a85591309ad88859 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Apr 2024 11:18:17 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@57936 git-svn-id: http://core.svn.wordpress.org/trunk@57437 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-http.php | 1 + wp-includes/functions.php | 2 ++ wp-includes/version.php | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-includes/class-wp-http.php b/wp-includes/class-wp-http.php index 48580680ba..ea8adde0ba 100644 --- a/wp-includes/class-wp-http.php +++ b/wp-includes/class-wp-http.php @@ -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; diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 5a5435d33f..ae18925c62 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -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', diff --git a/wp-includes/version.php b/wp-includes/version.php index bca4b74c3c..42e337c362 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-57934'; +$wp_version = '6.6-alpha-57936'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.