HTTP: Update Requests to master (0048f3c) which fixes a number of outstanding issues.
Fixes #38070, #37733 by reverting part of [38429] and using the fix in Requests. Fixes #37992 allowing for connecting to SSL resources on ports other than 443. Fixes #37991 by not sending default ports in the `Host:` header. Fixes #37839 to match and decode Chunked responses correctly. Fixes #38232 allowing a SSL connection to ignore the hostname of the certificate when verification is disabled. Built from https://develop.svn.wordpress.org/trunk@38727 git-svn-id: http://core.svn.wordpress.org/trunk@38670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -375,8 +375,9 @@ class Requests_Transport_cURL implements Requests_Transport {
|
||||
curl_setopt($this->handle, CURLOPT_URL, $url);
|
||||
curl_setopt($this->handle, CURLOPT_REFERER, $url);
|
||||
curl_setopt($this->handle, CURLOPT_USERAGENT, $options['useragent']);
|
||||
curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
|
||||
|
||||
if (!empty($headers)) {
|
||||
curl_setopt($this->handle, CURLOPT_HTTPHEADER, $headers);
|
||||
}
|
||||
if ($options['protocol_version'] === 1.1) {
|
||||
curl_setopt($this->handle, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
||||
}
|
||||
@@ -458,7 +459,7 @@ class Requests_Transport_cURL implements Requests_Transport {
|
||||
* @param string $data Body data
|
||||
* @return integer Length of provided data
|
||||
*/
|
||||
protected function stream_body($handle, $data) {
|
||||
public function stream_body($handle, $data) {
|
||||
$this->hooks->dispatch('request.progress', array($data, $this->response_bytes, $this->response_byte_limit));
|
||||
$data_length = strlen($data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user