Enonic version: 6.11.1
OS: macOS
Client-side request var ws = new WebSocket('/path/to/mapped/controller')
Server side response with controller mapping
exports.get = function(req) { if (!req.webSocket) return { status: 404 }; // If it is not a web socket request return someValidWebsocketResponseObject; }
Expected response code to client: 101 (change protocol)
Actual response code to client: 200 (OK)
Moving the code to be served as a service without controller mapping
Client-side request var ws = new WebSocket('/path/to/_/service')
With the same server side response
Expected response code to client: 101 (change protocol)
Actual response code to client: 101 (change protocol)