Skip to content

Conversation

jderusse
Copy link
Member

cURL does not allows to stream a response when performing another request.

Therefore, the current implementation that leverages the symfony's HttpResponse::stream method might trigger exception if the stream is used in another request. (ie. copying file using client->upload('2', client->download('1'))).

This PR removes the use of HttpResponse::stream and fallbacks to the generic ResponseBodyStream that buffers the entire response in a temporary file, which consumes the entire stream before processing the request and avoid the issue.

fix #1944

@jderusse jderusse force-pushed the stream-fix branch 2 times, most recently from 6f4c714 to 0361dc9 Compare September 12, 2025 09:17
@jderusse jderusse merged commit 1308c91 into async-aws:master Sep 24, 2025
16 of 17 checks passed
@jderusse jderusse deleted the stream-fix branch September 24, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SimpleS3: cURL error "API function called from within callback" when using streams

2 participants