Websockets failing to receive large messages
Large messages, above 65535 characters, fail to be parsed from browser to server. However, they are successfully sent from server to browser.
Do you have a stack trace or any further information? What have you tried so far to root cause the issue?
Unfortunately we've already taken out restbed and switched to mongoose so I don't have a call stack for you, but all you need to do is send a message larger that 65535 characters through a websocket connection to reproduce it, this example will do https://github.com/Corvusoft/restbed/blob/c587e26a5c5e97c4d7a8321bb8e7e4faf2ae6225/documentation/example/WEB_SOCKET.md. I started to try to fix it but there were multiple bugs in WebSocketManagerImpl::parse so I gave up. For starters here is one that I remember. Not only are you just setting it equal to the last bit shift, you're not doing the full 64 bits in the longer message length case. https://github.com/Corvusoft/restbed/blob/c587e26a5c5e97c4d7a8321bb8e7e4faf2ae6225/source/corvusoft/restbed/detail/web_socket_manager_impl.cpp#L112 WebSocketManagerImpl::compose, however, did seem to work correctly with longer messages.