Handle invalid msgpack messages sent from IE10

We have an application that communicates with the server through WS. We encode all messages with msgpack-lite , the library specification says it supports IE10. In all modern browsers like Chrome, Firefox, Safari and Edge, everything works well. But in IE10, we found a strange situation:

msgpack-lite encodes the message into the same binary file as in other browsers BUT after sending the encoded message to the backend, this binary message changes.

Example.

Our message that we want to encode and send to the server:

{
  "method": "subscribe",
  "data": {
    "sports": [
      85
    ]
  }
}

Encoded message (backend also processes the same data sent from all browsers except IE10):

[130 166 109 101 116 104 111 100 169 115 117 98 115 99 114 105 98 101 164 100 97 116 97 129 166 115 112 111 114 116 115 145 85]

, IE10:

[239 191 189 239 191 189 109 101 116 104 111 100 239 191 189 115 117 98 115 99 114 105 98 101 239 191 189 100 97 116 97 239 191 189 239 191 189 115 112 111 114 116 115 239 191 189 85]

, : websockets IE10?

+6
1

, , IE 10 , Uint8ClampedArray, msgpack-lite.

polyfill , , , , typedarray, .

, , - , , , .

0

Source: https://habr.com/ru/post/1017342/


All Articles