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-includes/functions.php

    r55117 r55210  
    944944            $headers = wp_get_http_headers( $url );
    945945            if ( $headers ) {
    946                 $len           = isset( $headers['content-length'] ) ? (int) $headers['content-length'] : 0;
    947                 $type          = isset( $headers['content-type'] ) ? $headers['content-type'] : '';
     946                $len           = isset( $headers['Content-Length'] ) ? (int) $headers['Content-Length'] : 0;
     947                $type          = isset( $headers['Content-Type'] ) ? $headers['Content-Type'] : '';
    948948                $allowed_types = array( 'video', 'audio' );
    949949
Note: See TracChangeset for help on using the changeset viewer.