mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Fixes ticket #61 - adds catches where necessary to handle errors thrown only by IE.
This commit is contained in:
@@ -223,8 +223,15 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Attempt to read status
|
||||||
|
var status;
|
||||||
|
try { status = xmlhttprequest.status; }
|
||||||
|
|
||||||
|
// If status could not be read, assume successful.
|
||||||
|
catch (e) { status = 200; }
|
||||||
|
|
||||||
// Start next request as soon as possible IF request was successful
|
// Start next request as soon as possible IF request was successful
|
||||||
if (xmlhttprequest.readyState >= 2 && nextRequest == null && xmlhttprequest.status == 200)
|
if (xmlhttprequest.readyState >= 2 && nextRequest == null && status == 200)
|
||||||
nextRequest = makeRequest();
|
nextRequest = makeRequest();
|
||||||
|
|
||||||
// Parse stream when data is received and when complete.
|
// Parse stream when data is received and when complete.
|
||||||
@@ -261,7 +268,12 @@ Guacamole.HTTPTunnel = function(tunnelURL) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var current = xmlhttprequest.responseText;
|
// Attempt to read in-progress data
|
||||||
|
var current;
|
||||||
|
try { current = xmlhttprequest.responseText; }
|
||||||
|
|
||||||
|
// Do not attempt to parse if data could not be read
|
||||||
|
catch (e) { return; }
|
||||||
|
|
||||||
// While search is within currently received data
|
// While search is within currently received data
|
||||||
while (elementEnd < current.length) {
|
while (elementEnd < current.length) {
|
||||||
|
Reference in New Issue
Block a user