mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +00:00
HTTP API: Fix request header inconsistencies.
This changeset improves the consistency in capitalization of fetching and outputting of request headers. It also updates occurrences found in some docblocks. Props johnjamesjacoby, costdev, audrasjb, petitphp, mhkuu, SergeyBiryukov. Fixes #54225. git-svn-id: https://develop.svn.wordpress.org/trunk@55210 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2824,12 +2824,12 @@ function discover_pingback_server_uri( $url, $deprecated = '' ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( wp_remote_retrieve_header( $response, 'x-pingback' ) ) {
|
||||
return wp_remote_retrieve_header( $response, 'x-pingback' );
|
||||
if ( wp_remote_retrieve_header( $response, 'X-Pingback' ) ) {
|
||||
return wp_remote_retrieve_header( $response, 'X-Pingback' );
|
||||
}
|
||||
|
||||
// Not an (x)html, sgml, or xml page, no use going further.
|
||||
if ( preg_match( '#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' ) ) ) {
|
||||
if ( preg_match( '#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'Content-Type' ) ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user