Steps to reproduce
I’m developing a WebSocket application to run in a cPanel session, and I’m getting WebSocket CloseEvent objects that have a code of 1005, even when the server sends a valid response code (e.g., 1000 or 1011).
Curiously, the CloseEvent object still has the “reason” string from the close frame.
I opened the session in Fiddler and confirmed that the browser is receiving a close frame with a code (i.e., a non-empty close frame). The browser is sending an empty close frame back, though.
This doesn’t happen on all sites; for example, the WebSocket endpoints that connect on websocket.org don’t do this.
I observed the same behavior in IE11 (most recent Win10).
I’m still working on reproduction steps.
Comments and activity
The attached perl script illustrates the bug.
You’ll need Net::WebSocket and HTTP::Request from CPAN to test this, by the way.
- Microsoft Edge Team
Changed Assigned To to “Steven K.”