Closed shogunpurple closed 8 years ago
It is in Chrome for a while and it respects the protocol. Your server should return a non empty header. It's a server issue. See the same on rabbitmq https://github.com/rabbitmq/rabbitmq-web-stomp/issues/53 It might be SockJS or your server that had been updated.
See if you can fix the server, or else you would have to cheat on client side by sending empty protocols. I do not know how this can be set using SockJS, but you can definitely set it using native WebSocket https://github.com/JSteunou/webstomp-client/blob/master/src/webstomp.js#L9
Ok, thanks. I cannot see the header in the dev tools so I can match it up with the server. Do you know the default protocol set with Stomp.over so I can configure my server to respond appropriately?
Nope I dont. Because it's not this lib who's sending the protocol. It's the WebSocket object or your over layer, in your case SockJS. Look at the link I posted above.
It seems like the latest version of Chrome has broken my websocket functionality in my application. I am utilising the following code to use Stomp with a SockJS websocket.
I am using spring boot in the backend which is also unchanged. I assumed that using
Stomp.over
would not send that header (or some sort of default one), and it has been working fine for a long time without sending the response header from the server for the subprotocol. I cannot see any 'Sec-WebSocket-Protocol' header in the dev tools either. Any ideas what may have happened here?Thanks.