Skip to content
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

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

Merged
merged 2 commits into from
Apr 24, 2024
Merged

Conversation

joedixon
Copy link
Collaborator

@joedixon joedixon commented Apr 23, 2024

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


use Symfony\Component\HttpFoundation\JsonResponse;

class Response extends JsonResponse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to name this specifically ReverbResponse so it's more clear in error logs when this response is logged?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly though that doesn't match the naming of anything else in that directory.

I'm waiting on a test to verify this actually resolves the issue anyway so will wait until then before making any further changes.

@DiogoLindoso
Copy link

It's works for me

@taylorotwell taylorotwell merged commit b0d0592 into main Apr 24, 2024
9 checks passed
@taylorotwell taylorotwell deleted the fix/openssl branch April 24, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using ssl in valet environment causes error.
4 participants