]> git.proxmox.com Git - mirror_novnc.git/commit
Improved websocket binary support detection
authorDominic Luechinger <dol@cyon.ch>
Tue, 11 Mar 2014 13:29:58 +0000 (14:29 +0100)
committerDominic Luechinger <dol@cyon.ch>
Tue, 11 Mar 2014 13:29:58 +0000 (14:29 +0100)
commit97362c39804f07bdfa11c73b07189b1949eb5e97
treebcf696a1d7f3560d80bd28155bb597e8e50e1d7d
parentc70000bac498e71852c162234661863cb0c3aaea
Improved websocket binary support detection

A facke connection to 'wss://localhost:17523' (randomly chosen) to detect
the WebSocket binary support is not the best solution.
First of all, check of prototype has the property 'binaryType'. If not,
perform a dummy connection to 'wss://.' instead of 'wss://localhost:17523'.

This patch was inspired by the discussion and implementation of Modernizr:
https://github.com/Modernizr/Modernizr/issues/370
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/websockets/binary.js
include/rfb.js
include/websock.js