New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to read response's body contents #95
Comments
Merging commit: 28d8dbf |
Yes, this appears to be a regression that will need to be reverted.
|
- fixes an edge case and is more logical - remove trimming of headers which is not according to psr-7 - fix '0' problem for response reason - improve tests
I'm fixing this. |
👍 |
See #96 |
Was looking for a solution all the day and found this issue ;x I rolled back to 1.3. and now i wait for the update ;) |
I'm kinda surprised that so many developers seem to be relying on an unreleased, unstable version (dev-master). And for this library it doesn't even seem necessary as it is getting regular tags (unlike some other libraries where you might be forced to dev versions). |
Commit 45054d9#diff-f89246dce7e387482b2c6c584a5e7e9dR97 have introduced a bug by comparing
$body
with empty string.I did not dug too deeply to find out the real reason of wrong behavior, but I guess it is caused by implicit calling of
GuzzleHttp\Psr7\Stream::__toString()
in order to cast object to string to make a comparison.How to reproduce
What is expected
$html
contains a response HTMLWhat do we have instead
$html
is an empty stringPatch?
Rolling back that line to
if ($body !== null)
fixes the problem. Not sure whether it is a proper fix.Environment
PHP 5.6.20
Ubuntu 16.04
guzzle/psr7@dev-master
The text was updated successfully, but these errors were encountered: