X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/3d39054f012aefe514b3f5509e32f09fc4feda44..073c5ed6408e2f00dc1863b463fe205467628905:/wp-includes/class-http.php?ds=sidebyside diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index c0272ba4..5a307584 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -332,6 +332,7 @@ class WP_Http { // SSL certificate handling if ( ! $r['sslverify'] ) { $options['verify'] = false; + $options['verifyname'] = false; } else { $options['verify'] = $r['sslcertificates']; } @@ -362,8 +363,8 @@ 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 ); + // Avoid issues where mbstring.func_overload is enabled + mbstring_binary_safe_encoding(); try { $requests_response = Requests::request( $url, $headers, $data, $type, $options ); @@ -379,6 +380,8 @@ class WP_Http { $response = new WP_Error( 'http_request_failed', $e->getMessage() ); } + reset_mbstring_encoding(); + /** * Fires after an HTTP API response is received and before the response is returned. *