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. Built from https://develop.svn.wordpress.org/trunk@38429 git-svn-id: http://core.svn.wordpress.org/trunk@38370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b3faafc632
commit
e45ebb28f2
|
@ -362,6 +362,9 @@ class WP_Http {
|
|||
}
|
||||
}
|
||||
|
||||
// Work around a bug in Requests when the path starts with // See https://github.com/rmccue/Requests/issues/231
|
||||
$url = preg_replace( '!^(\w+://[^/]+)//(.*)$!i', '$1/$2', $url );
|
||||
|
||||
try {
|
||||
$requests_response = Requests::request( $url, $headers, $data, $type, $options );
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-alpha-38428';
|
||||
$wp_version = '4.7-alpha-38429';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue