6

I am using wss (secured web sockets) with spring 4.2.x from backend and STOMP for javascript client. I can run it successfully under http, but failed when under https.

The only error I met is:

ERROR o.s.w.s.s.s.DefaultHandshakeHandler - Handshake failed due to invalid Upgrade header: null

The JS error is:

WebSocket connection to 'wss://.example.com/.../websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

I googled a lot and understand that I should do some configuration on wildfly to make it support wss requests. But I don't know how. Thanks in advance if someone can give any idea!

Cara.Zhou
  • 71
  • 1
  • 4
  • 3
    I recommend you to read the following links: [handshake-failed-due-to-invalid-upgrade-header-in-tomcat-deployed-in-ebs](https://stackoverflow.com/questions/32610707/handshake-failed-due-to-invalid-upgrade-header-in-tomcat-deployed-in-ebs) [spring-websocket-handshake-failed-due-to-invalid-upgrade-header-null](https://stackoverflow.com/questions/31211919/spring-websocket-handshake-failed-due-to-invalid-upgrade-header-null) – Maya Aug 29 '18 at 13:39
  • Did you find a solution? – Palsri Nov 20 '18 at 09:38
  • Possible duplicate of [https://stackoverflow.com/questions/31211919/spring-websocket-handshake-failed-due-to-invalid-upgrade-header-null) – smilyface Aug 22 '19 at 13:17

0 Answers0