summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ole Hurlen <lars.ole.hurlen@vard.com>2016-03-11 08:32:50 +0100
committerSolly Ross <sross@redhat.com>2016-09-16 17:23:03 -0400
commitd838104dd590ffbd237b0e90f7f7e37b29a5a618 (patch)
tree3b8dda676e1ce6779dcb83245737ca5ea4c4b8dc
parent386db8f54fac3bcc3fe38f2a8530bb1175fe6037 (diff)
downloadnovnc-feature/realvnc5-version-number.tar.gz
Support RealVNC 5.3 Protocol Versionfeature/realvnc5-version-number
The RFB protocol specifies a max version of 3.8, but RealVNC likes to increment their version. RealVNC 5.3 sends "005.000" as the version string, since they've extended their implementation upon RFB v3.8. We can pretend to support that version, since it's basically just noVNC 3.8.
-rw-r--r--core/rfb.js1
-rw-r--r--tests/test.rfb.js5
2 files changed, 6 insertions, 0 deletions
diff --git a/core/rfb.js b/core/rfb.js
index 135d3a7..7af8740 100644
--- a/core/rfb.js
+++ b/core/rfb.js
@@ -670,6 +670,7 @@
case "003.008":
case "004.000": // Intel AMT KVM
case "004.001": // RealVNC 4.6
+ case "005.000": // RealVNC 5.3
this._rfb_version = 3.8;
break;
default:
diff --git a/tests/test.rfb.js b/tests/test.rfb.js
index 3d856fa..9ceda66 100644
--- a/tests/test.rfb.js
+++ b/tests/test.rfb.js
@@ -564,6 +564,11 @@ describe('Remote Frame Buffer Protocol Client', function() {
expect(client._rfb_version).to.equal(3.8);
});
+ it('should interpret version 005.000 as version 3.8', function () {
+ send_ver('005.000', client);
+ expect(client._rfb_version).to.equal(3.8);
+ });
+
it('should fail on an invalid version', function () {
send_ver('002.000', client);
expect(client._rfb_state).to.equal('failed');