Closed iget-master closed 3 years ago
Could someone help here? This issue is stopped for half year!
Looks like a valid use-case that should be supported. I'd gladly see a PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions.
This is duplicate of #79 because it's out of attention. There is a fix proposed on slimphp/Slim#1838 that solves this issue.
The steps to reproduce the bug is:
$stream = popen('ls', 'r'); $guzzleClient->post('http://someurl.com/', [ 'headers' => [ 'content-type' => 'application/octet-stream'], 'body' => $stream ];
The http request will be made before the ls process run since guzzle http detects the size as zero, ignoring the fact of it being a pipe (pipes always will read zero, but can be detected by reading the
fstat()['mode']
.If you guys agree, I can do a PR to solve this, but I need a confirmation that this idea is valid to don't waste time.
This issue is affecting the spatie/dropbox-api and some other projects, forcing me to read the stream to a string (using too much memory)