You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you decide to use this solution, as I did, then you may encounter an error resending headers yii\web\HeadersAlreadySentException: Headers already sent.
If you decide to use this solution, as I did, then you may encounter an error resending headers
yii\web\HeadersAlreadySentException: Headers already sent.
The thing is that licson/libSSE-php itself sends headers via Symfony StreamedResponse https://github.com/licson/libSSE-php/blob/master/src/SSE.php#L266, without affecting Yii in any way.
This solution does not take this into account.
Yii sends headers here https://github.com/yiisoft/yii2/blob/master/framework/web/Response.php#L346
So I just told Yii that the response has already been sent, something like this:
Yii::$app->response->isSent = true;
Full example:
The solution, of course, is straightforward, but it works :)
The text was updated successfully, but these errors were encountered: