io/channel-websock: treat 'binary' and no sub-protocol as the same
commitc64e1e75381d0cb53f9fc8f93245a933b12c68a6
authorYu-Chen Lin <npes87184@gmail.com>
Sat, 23 Nov 2019 03:43:06 +0000 (23 11:43 +0800)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 7 Feb 2020 12:22:18 +0000 (7 12:22 +0000)
tree11cf9c9e2a8ce72a874639fcaf2b825912b6aa19
parent5b7686f3fa2092d2b3be92df67b5966ee1b0142a
io/channel-websock: treat 'binary' and no sub-protocol as the same

noVNC doesn't use 'binary' protocol by default after
commit c912230309806aacbae4295faf7ad6406da97617.

It will cause qemu return 400 when handshaking.

To overcome this problem and remain compatibility of
older noVNC client.

We treat 'binary' and no sub-protocol as the same
so that we can support different version of noVNC
client.

Tested on noVNC before c912230 and after c912230.

Buglink: https://bugs.launchpad.net/qemu/+bug/1849644
Signed-off-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
io/channel-websock.c