WordPress/wp-includes/rest-api
TimothyBlynJacobs 48128ad56d REST API: Improve performance for HEAD requests.
By default, the REST API responds to HEAD rqeuests by calling the GET handler and omitting the body from the response. While convenient, this ends up performing needless work that slows down the API response time.

This commit adjusts the Core controllers to specifically handle HEAD requests by not preparing the response body.

Fixes #56481.
Props antonvlasenko, janusdev, ironprogrammer, swissspidy, spacedmonkey, mukesh27, mamaduka, timothyblynjacobs.


Built from https://develop.svn.wordpress.org/trunk@59899


git-svn-id: http://core.svn.wordpress.org/trunk@59241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2025-03-02 22:07:25 +00:00
..
endpoints REST API: Improve performance for HEAD requests. 2025-03-02 22:07:25 +00:00
fields Meta: Add label argument to register_meta function 2024-09-16 11:33:38 +00:00
search REST API: Remove post status prefix from REST API responses. 2024-07-23 07:51:12 +00:00
class-wp-rest-request.php REST API: Improve performance for HEAD requests. 2025-03-02 22:07:25 +00:00
class-wp-rest-response.php
class-wp-rest-server.php REST API: Add the site reading options to the index. 2025-02-27 03:39:25 +00:00