提交的内容
This commit is contained in:
4
vendor/rmccue/requests/src/Transport/Curl.php
vendored
Executable file → Normal file
4
vendor/rmccue/requests/src/Transport/Curl.php
vendored
Executable file → Normal file
@ -465,7 +465,7 @@ final class Curl implements Transport {
|
||||
* @param string $response Response data from the body
|
||||
* @param array $options Request options
|
||||
* @return string|false HTTP response data including headers. False if non-blocking.
|
||||
* @throws \WpOrg\Requests\Exception
|
||||
* @throws \WpOrg\Requests\Exception If the request resulted in a cURL error.
|
||||
*/
|
||||
public function process_response($response, $options) {
|
||||
if ($options['blocking'] === false) {
|
||||
@ -561,7 +561,7 @@ final class Curl implements Transport {
|
||||
/**
|
||||
* Format a URL given GET data
|
||||
*
|
||||
* @param string $url
|
||||
* @param string $url Original URL.
|
||||
* @param array|object $data Data to build query using, see {@link https://www.php.net/http_build_query}
|
||||
* @return string URL with data
|
||||
*/
|
||||
|
||||
17
vendor/rmccue/requests/src/Transport/Fsockopen.php
vendored
Executable file → Normal file
17
vendor/rmccue/requests/src/Transport/Fsockopen.php
vendored
Executable file → Normal file
@ -51,6 +51,11 @@ final class Fsockopen implements Transport {
|
||||
*/
|
||||
private $max_bytes = false;
|
||||
|
||||
/**
|
||||
* Cache for received connection errors.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $connect_error = '';
|
||||
|
||||
/**
|
||||
@ -139,7 +144,15 @@ final class Fsockopen implements Transport {
|
||||
$verifyname = false;
|
||||
}
|
||||
|
||||
stream_context_set_option($context, ['ssl' => $context_options]);
|
||||
// Handle the PHP 8.4 deprecation (PHP 9.0 removal) of the function signature we use for stream_context_set_option().
|
||||
// Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#stream_context_set_option
|
||||
if (function_exists('stream_context_set_options')) {
|
||||
// PHP 8.3+.
|
||||
stream_context_set_options($context, ['ssl' => $context_options]);
|
||||
} else {
|
||||
// PHP < 8.3.
|
||||
stream_context_set_option($context, ['ssl' => $context_options]);
|
||||
}
|
||||
} else {
|
||||
$remote_socket = 'tcp://' . $host;
|
||||
}
|
||||
@ -405,7 +418,7 @@ final class Fsockopen implements Transport {
|
||||
/**
|
||||
* Format a URL given GET data
|
||||
*
|
||||
* @param array $url_parts
|
||||
* @param array $url_parts Array of URL parts as received from {@link https://www.php.net/parse_url}
|
||||
* @param array|object $data Data to build query using, see {@link https://www.php.net/http_build_query}
|
||||
* @return string URL with data
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user