Make WordPress Core


Ignore:
Timestamp:
08/29/2016 02:32:48 AM (8 years ago)
Author:
dd32
Message:

HTTP: Handle an edgecase within the URI parsing library included in Requests, where if a double slash exists at the start of the path the URL is passed to cURL malformed.

Props flixos90 for initial patch.
Fixes #37733 for trunk.

File:
1 edited

Legend:

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

    r38411 r38429  
    363363        }
    364364
     365        // Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231
     366        $url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url );
     367
    365368        try {
    366369            $requests_response = Requests::request( $url, $headers, $data, $type, $options );
Note: See TracChangeset for help on using the changeset viewer.