IE10 cierra la conexión después del apretón de manos
-
12-11-2019 - |
Pregunta
Implementé un servidor de SELECK DESCHOQUERO EN LIBEVENT Y mientras no tengo problemas con Chrome o Firefox, con IE10, ni siquiera puedo establecer una conexión.
Aquí los apretones de manos:
IE10 Request:
GET /echo HTTP/1.1
Origin: 95.115.195.4
Sec-WebSocket-Key: rgPWUlUtk+h3CPWqk99OtA==
Connection: Upgrade
Upgrade: Websocket
Sec-WebSocket-Version: 8
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)
Host: 95.115.195.4:5555
Cache-Control: no-cache
Server Response:
HTTP/1.1 101 Switching Protocols
Upgrade: Websocket
Connection: Upgrade
Sec-WebSocket-Accept: jGmgQ/jOvew8MU9o3bbqPG9PHlY=
Sec-WebSocket-Protocol: chat
El depurador de IE10 dice: Script12152: Error de Scocket: respuesta http incorrecta.Código de estado 101
¿Alguien sabe lo que estoy haciendo mal?
gracias
Solución
El cliente no envió una lista de sub-protocolos, pero su servidor ha enviado "chat" como el valor del subprotocolo.De acuerdo con la página 19 de especificaciones web de IETF 6455 (FIN DE SECCIÓN 4.1 Requisitos del cliente):
6. If the response includes a |Sec-WebSocket-Protocol| header field
and this header field indicates the use of a subprotocol that was
not present in the client's handshake (the server has indicated a
subprotocol not requested by the client), the client MUST _Fail
the WebSocket Connection_.