-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Merge pull request #943 from da-als/master #943
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
Conversation
suggested fix for issue 665 "data read at end of SSL handshake is discarded"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, although I wasn't able to test this.
@PhilipRoman thx, I will try it when I have some time on my hands. |
I had some problems running this. |
After your report I tried running all the tests in the project. The only test that failed for me was "Issue256Test", but this one also fails without the changes from the merge (it fails on the master branch of the main project) so it has no relation to this pull request. |
@da-als I was running it against the big websocket autobahn test suite, which is not part of the normal unit test. Currently, really busy, so I did not have more time to take a look at this sorry.. |
@da-als |
I havent forgotten this PR, currently just very busy... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test look good
@da-als thx a lot for your contribution! |
@marci4 Happy to help! Glad to see the fix merged. |
Thank you everyone for getting that pulled in! |
Any plan to push a new version (1.4.1?) to Maven repo? |
@doyledavidson a snapshot should be available |
Description
This pull request includes a fix developed by @doyledavidson where any data located after the end of a SSL handshake is saved to be returned on the next read operation. This way, the data is not lost and connections from clients that append data at the end of the handshake do not have trouble communicating with Java-WebSocket.
Related Issue
Fixes #665
Fixes #940
Motivation and Context
Some clients, when connecting to a WSS server, use TLS False Start, which causes initial data to be appended to the SSL handshake. That data gets discarded by the Java-WebSocket server which often causes communication problems, even causing the connection to become unresponsive for the client as it waits for a reply from the server.
How Has This Been Tested?
I use the Java-WebSocket library on an application that acts as a local server on hundreds of clients that access this server functionality from a regular web browser. Clients that are using browsers that use TLS False Start often required multiple connection attempts to work around the issue, and even that, in some cases, was not enough. I have deployed my fork of this library with a new beta of my application on about a dozen clients for testing; they are not running into the issue anymore (connections work on the first try) and no regressions have been reported.
Types of changes
Checklist:
Once again, the code was added by @doyledavidson, not myself. I am not familiar with the process for running the tests, but since it affects new connections' handshakes and their first read operations I would assume the changes would be fully covered by existing tests.