Make WordPress Core


Ignore:
Timestamp:
02/03/2023 01:33:18 PM (2 years 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-admin/includes/file.php

    r55204 r55210  
    11851185    }
    11861186
    1187     $content_disposition = wp_remote_retrieve_header( $response, 'content-disposition' );
     1187    $content_disposition = wp_remote_retrieve_header( $response, 'Content-Disposition' );
    11881188
    11891189    if ( $content_disposition ) {
     
    12121212    }
    12131213
    1214     $content_md5 = wp_remote_retrieve_header( $response, 'content-md5' );
     1214    $content_md5 = wp_remote_retrieve_header( $response, 'Content-MD5' );
    12151215
    12161216    if ( $content_md5 ) {
     
    12391239    // Perform signature valiation if supported.
    12401240    if ( $signature_verification ) {
    1241         $signature = wp_remote_retrieve_header( $response, 'x-content-signature' );
     1241        $signature = wp_remote_retrieve_header( $response, 'X-Content-Signature' );
    12421242
    12431243        if ( ! $signature ) {
Note: See TracChangeset for help on using the changeset viewer.