Make WordPress Core


Ignore:
Timestamp:
02/03/2023 01:33:18 PM (14 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/tests/phpunit/tests/http/base.php

    r54968 r55210  
    284284        $this->assertNotWPError( $res );
    285285        $this->assertSame( '', $res['body'] ); // The body should be empty.
    286         $this->assertEquals( $size, $res['headers']['content-length'] );   // Check the headers are returned (and the size is the same).
     286        $this->assertEquals( $size, $res['headers']['Content-Length'] );   // Check the headers are returned (and the size is the same).
    287287        $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters.
    288288        $this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp directory.
Note: See TracChangeset for help on using the changeset viewer.