You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to use GuzzleHandler with StreamHandler for avoiding to use curl module.
But S3Client::doesBucketExist() and doesObjectExist() return invalid results.
$handler = new \Aws\Handler\GuzzleV6\GuzzleHandler(
new \GuzzleHttp\Client(['handler' => new \GuzzleHttp\Handler\StreamHandler()])
);
$client = new \Aws\S3\Client(['http_handler' => $handler, ...]);
$actual = $client->doesBucketExist('invalid bucket name'); // => return true (always).
You need to ensure that the handler you use with the SDK is throwing an exception when a non-200/300 response is received. This can be done when creating the Guzzle handler.
I try to use GuzzleHandler with StreamHandler for avoiding to use curl module.
But S3Client::doesBucketExist() and doesObjectExist() return invalid results.
Because GuzzleHandler (using StreamHandler) is fulfilled when response status code is 404 .
here: https://github.com/aws/aws-sdk-php/blob/master/src/Handler/GuzzleV6/GuzzleHandler.php#L42
The text was updated successfully, but these errors were encountered: