Make WordPress Core


Ignore:
Timestamp:
02/03/2023 01:33:18 PM (16 months ago)
Author:
audrasjb
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r54891 r55210  
    28252825    }
    28262826
    2827     if ( wp_remote_retrieve_header( $response, 'x-pingback' ) ) {
    2828         return wp_remote_retrieve_header( $response, 'x-pingback' );
     2827    if ( wp_remote_retrieve_header( $response, 'X-Pingback' ) ) {
     2828        return wp_remote_retrieve_header( $response, 'X-Pingback' );
    28292829    }
    28302830
    28312831    // Not an (x)html, sgml, or xml page, no use going further.
    2832     if ( preg_match( '#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'content-type' ) ) ) {
     2832    if ( preg_match( '#(image|audio|video|model)/#is', wp_remote_retrieve_header( $response, 'Content-Type' ) ) ) {
    28332833        return false;
    28342834    }
Note: See TracChangeset for help on using the changeset viewer.