laravel / reverb

Laravel Reverb provides a real-time WebSocket communication backend for Laravel applications.
https://reverb.laravel.com
MIT License
1.02k stars 71 forks source link

[1.x] Sends content length to address OpenSSL issue #167

Closed joedixon closed 4 months ago

joedixon commented 4 months ago

When using newer versions of OpenSSL, we are running into the following error when trying to broadcast a message:

local.ERROR: cURL error 56: OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 

It would appear to relate to OpenSSL changing its defaults in handling "unexpected" EOF

To resolve this, I have implemeted a new Laravel\Reverb\Servers\Reverb\Http\Response class which inherits from Symfony's JsonResponse which automatically sets the Content-Length header and informs OpenSSL when to close.

This PR resolves #163

DiogoLindoso commented 4 months ago

It's works for me