Hi,
Looking at "unsuccessful connection.pcapng" it seems that the sequence of events is like this.
1. The upgrade request is sent by the client.
2. The client sends the first websocket text frame before waiting for the upgrade response.
3. The server is accepting the upgrade request sends back a 101 upgrade response.
4. The server sends a 400 response due to an illegal character 0x81 which was the first byte
of the websocket TEXT frame.
So it looks like the server is trying to read the first WebSocket frame as a HTTP
frame even though it has accepted the websocket upgrade.
See packet 18:
Hypertext Transfer Protocol
HTTP/1.1 400 Illegal character OTEXT=0x81\r\n
Content-Type: text/html;charset=iso-8859-1\r\n
Content-Length: 71\r\n
Connection: close\r\n
Server: Jetty(9.4.15.v20190215)\r\n
\r\n
Also note that the server is not accepting the permessage-deflate extension even in the
"successful connection.pcapng" even though it was offered in the client upgrade request.
This may be related to the RSV bit problems.