Added websocket handshake response with safe string manipulation.