-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
I'm struggling to reproduce this and I can't anymore, but it's fairly clear in the code this is possible. There are two places where the data
event for a Response
can be triggered.
In Response::handleData the arguments are string
, Response
.
In Request::handleData the arguments are Psr\Http\Message\StreamInterface
, Response
.
The latter seems to be correct, happens all the time, and what I want to incrementally read from the stream, so I just wrap my own handleData
logic in $stream instanceof StreamInterface
but that feels smelly.
The thing I can't reproduce is when Response::handleData
gets called. It was happening to me every single time the responding server threw a fatal PHP error, now I can't make it happen. Also of interesting note it was returning only part of the PHP error text, although the stream itself yielded the entire text.
Also of note this is with v0.4.10 (I'll update to the latest) but the code is identical in your master branch.