Closed nawedr closed 1 year ago
AFAIK, this behavior is not specified by PSR-7 so the current behavior is also correct. What could help is add a test case for this in https://github.com/php-http/psr7-integration-tests/ and ensuring all implementations agree on the expected behavior first.
Note that the cast to string is specified to seek.
Still, this should be fixed by #217
Using the psr17factory for creating a request object using this syntax, when we try to get the contents of the body, we get empty string.
The problem is in the createStream method, while creating the stream the file seek goes to the end of the temp file created and when we try to get the contents it starts reading from end, hence the empty string.