Description
Describe the bug
After updating the aws-sdk-php from 3.305.4 to 3.325.2, my code suddenly stopped working.
After testing it further, the problem was introduced in the 3.319.4 version, 3.319.3 still works.
I get an Stream is not seekable
exception when doing a S3Client->headObject call.
Streams are enabled via the global bundle setting:
aws:
http:
stream: true
It seems to be caused by the new introduced S3Parser which allways trys to rewind the stream when checking if the 2xx result is an error:
https://github.com/yenfryherrerafeliz/aws-sdk-php/blob/bb1c0d42b646bcf4a520fe58d722b8097cc12149/src/S3/Parser/S3Parser.php#L181
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
Returns the head infos.
Current Behavior
A RuntimeException
with the Stream is not seekable
message is thrown.
Reproduction Steps
Enable streams in the bundle settings:
aws:
http:
stream: true
Call headObject on the S3Client instance
Possible Solution
No response
Additional Information/Context
No response
SDK version used
2.7.0
Environment details (OS name and version, etc.)
Linux, PHP 8.2.24 FPM, Symfony 7.0.8