},
{
"name": "guzzlehttp/guzzle",
- "version": "7.4.1",
+ "version": "7.4.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79"
+ "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
- "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4",
+ "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4",
"shasum": ""
},
"require": {
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.4.1"
+ "source": "https://github.com/guzzle/guzzle/tree/7.4.2"
},
"funding": [
{
"type": "tidelift"
}
],
- "time": "2021-12-06T18:43:05+00:00"
+ "time": "2022-03-20T14:16:28+00:00"
},
{
"name": "guzzlehttp/promises",
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.4.1",
- "version_normalized": "7.4.1.0",
+ "version": "7.4.2",
+ "version_normalized": "7.4.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79"
+ "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
- "reference": "ee0a041b1760e6a53d2a39c8c34115adc2af2c79",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/ac1ec1cd9b5624694c3a40be801d94137afb12b4",
+ "reference": "ac1ec1cd9b5624694c3a40be801d94137afb12b4",
"shasum": ""
},
"require": {
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware"
},
- "time": "2021-12-06T18:43:05+00:00",
+ "time": "2022-03-20T14:16:28+00:00",
"type": "library",
"extra": {
"branch-alias": {
},
"installation-source": "dist",
"autoload": {
- "psr-4": {
- "GuzzleHttp\\": "src/"
- },
"files": [
"src/functions_include.php"
- ]
+ ],
+ "psr-4": {
+ "GuzzleHttp\\": "src/"
+ }
},
"notification-url": "https://packagist.org/downloads/",
"license": [
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.4.1"
+ "source": "https://github.com/guzzle/guzzle/tree/7.4.2"
},
"funding": [
{
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
- 'pretty_version' => '7.4.1',
- 'version' => '7.4.1.0',
+ 'pretty_version' => '7.4.2',
+ 'version' => '7.4.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
- 'reference' => 'ee0a041b1760e6a53d2a39c8c34115adc2af2c79',
+ 'reference' => 'ac1ec1cd9b5624694c3a40be801d94137afb12b4',
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
Please refer to [UPGRADING](UPGRADING.md) guide for upgrading to a major version.
+## 7.4.2 - 2022-03-20
+
+### Fixed
+
+- Remove curl auth on cross-domain redirects to align with the Authorization HTTP header
+- Reject non-HTTP schemes in StreamHandler
+- Set a default ssl.peer_name context in StreamHandler to allow `force_ip_resolve`
+
## 7.4.1 - 2021-12-06
### Changed
"psr/log": "Required for using the Log middleware"
},
"config": {
+ "allow-plugins": {
+ "bamarni/composer-bin-plugin": true
+ },
"preferred-install": "dist",
"sort-packages": true
},
private $selectTimeout;
/**
- * @var resource|\CurlMultiHandle|null the currently executing resource in `curl_multi_exec`.
+ * @var int Will be higher than 0 when `curl_multi_exec` is still running.
*/
- private $active;
+ private $active = 0;
/**
* @var array Request entry handles, indexed by handle id in `addRequest`.
$methods = \array_flip(\get_class_methods(__CLASS__));
}
+ if (!\in_array($request->getUri()->getScheme(), ['http', 'https'])) {
+ throw new RequestException(\sprintf("The scheme '%s' is not supported.", $request->getUri()->getScheme()), $request);
+ }
+
// HTTP/1.1 streams using the PHP stream wrapper require a
// Connection: close header
if ($request->getProtocolVersion() == '1.1'
return $this->createResource(
function () use ($uri, &$http_response_header, $contextResource, $context, $options, $request) {
$resource = @\fopen((string) $uri, 'r', false, $contextResource);
- $this->lastHeaders = $http_response_header;
+ $this->lastHeaders = $http_response_header ?? [];
if (false === $resource) {
throw new ConnectException(sprintf('Connection refused for URI %s', $uri), $request, null, $context);
'ignore_errors' => true,
'follow_location' => 0,
],
+ 'ssl' => [
+ 'peer_name' => $request->getUri()->getHost(),
+ ],
];
$body = (string) $request->getBody();
$this->guardMax($request, $response, $options);
$nextRequest = $this->modifyRequest($request, $options, $response);
+ // If authorization is handled by curl, unset it if host is different.
+ if ($request->getUri()->getHost() !== $nextRequest->getUri()->getHost()
+ && defined('\CURLOPT_HTTPAUTH')
+ ) {
+ unset(
+ $options['curl'][\CURLOPT_HTTPAUTH],
+ $options['curl'][\CURLOPT_USERPWD]
+ );
+ }
+
if (isset($options['allow_redirects']['on_redirect'])) {
($options['allow_redirects']['on_redirect'])(
$request,