Prior investigation work:
Ruling out my server: https://github.com/websockets/ws/issues/2109 Ruling out my client: https://bugs.chromium.org/p/chromium/issues/detail?id=1421590
Reproducing the issue on my machine (unfortunately, some other machines have not been able to duplicate this):
- Start any websocket server on my laptop (for this repro, I just use NodeJS and the
ws
library, as detailed in the Chromium ticket above) - Use any client (specifically validated with Google Chrome and Safari) to connect to this server over localhost then send a single message
- This results in the server erroring, because the initial connecting WS HTTP GET request is re-sent immediately before the actual message
When I do the same thing not over localhost, this works just fine.
I have captured the packets that Chrome sends using a Chrome tool, and at the same time, captured the packets that the server receives using tcpdump. Chrome does not show the duplicated GET request, while the server does.
It seems like it must be an OS issue, or perhaps something hooking the socket connection and messing it up. How can I debug this further? Thanks so much.