Make WordPress Core


Ignore:
Timestamp:
12/06/2021 09:29:00 PM (2 years ago)
Author:
SergeyBiryukov
Message:

HTTP API: Revert changeset [52244].

Reverting Requests 2.0.0 changes and moving to WordPress 6.0 cycle. Why? The namespace and file case renaming revealed 2 issues in Core's upgrader process.

See https://core.trac.wordpress.org/ticket/54504#comment:22 for more information.

Follow-up to [52327].

See #54562, #54504.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-http-requests-response.php

    r52244 r52328  
    99
    1010/**
    11  * Core wrapper object for a WpOrg\Requests\Response for standardisation.
     11 * Core wrapper object for a Requests_Response for standardisation.
    1212 *
    1313 * @since 4.6.0
     
    2020     *
    2121     * @since 4.6.0
    22      * @var \WpOrg\Requests\Response
     22     * @var Requests_Response
    2323     */
    2424    protected $response;
     
    3737     * @since 4.6.0
    3838     *
    39      * @param \WpOrg\Requests\Response $response HTTP response.
    40      * @param string                   $filename Optional. File name. Default empty.
     39     * @param Requests_Response $response HTTP response.
     40     * @param string            $filename Optional. File name. Default empty.
    4141     */
    42     public function __construct( WpOrg\Requests\Response $response, $filename = '' ) {
     42    public function __construct( Requests_Response $response, $filename = '' ) {
    4343        $this->response = $response;
    4444        $this->filename = $filename;
     
    5050     * @since 4.6.0
    5151     *
    52      * @return WpOrg\Requests\Response HTTP response.
     52     * @return Requests_Response HTTP response.
    5353     */
    5454    public function get_response_object() {
     
    6161     * @since 4.6.0
    6262     *
    63      * @return \WpOrg\Requests\Utility\CaseInsensitiveDictionary Map of header name to header value.
     63     * @return \Requests_Utility_CaseInsensitiveDictionary Map of header name to header value.
    6464     */
    6565    public function get_headers() {
    6666        // Ensure headers remain case-insensitive.
    67         $converted = new WpOrg\Requests\Utility\CaseInsensitiveDictionary();
     67        $converted = new Requests_Utility_CaseInsensitiveDictionary();
    6868
    6969        foreach ( $this->response->headers->getAll() as $key => $value ) {
     
    8686     */
    8787    public function set_headers( $headers ) {
    88         $this->response->headers = new WpOrg\Requests\Response\Headers( $headers );
     88        $this->response->headers = new Requests_Response_Headers( $headers );
    8989    }
    9090
Note: See TracChangeset for help on using the changeset viewer.