From d0c582b5e88e999c6cfd99b907809fd6df6f69b1 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 16 Oct 2012 14:13:18 -0700 Subject: [PATCH] Add unique integer to end of request (fix #201). --- guacamole-common-js/src/main/resources/tunnel.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/resources/tunnel.js b/guacamole-common-js/src/main/resources/tunnel.js index 4f75ea3f6..812ee897d 100644 --- a/guacamole-common-js/src/main/resources/tunnel.js +++ b/guacamole-common-js/src/main/resources/tunnel.js @@ -434,12 +434,16 @@ Guacamole.HTTPTunnel = function(tunnelURL) { } + /** + * Arbitrary integer, unique for each tunnel read request. + */ + var request_id = 0; function makeRequest() { - // Download self + // Make request, increment request ID var xmlhttprequest = new XMLHttpRequest(); - xmlhttprequest.open("POST", TUNNEL_READ + tunnel_uuid); + xmlhttprequest.open("GET", TUNNEL_READ + tunnel_uuid + ":" + (request_id++)); xmlhttprequest.send(null); return xmlhttprequest;