Remove a wasted check of XMLHttpResponse state
authorMark Donnelly <mark@painless-security.com>
Thu, 2 Apr 2015 21:31:15 +0000 (17:31 -0400)
committerMark Donnelly <mark@painless-security.com>
Thu, 2 Apr 2015 21:31:15 +0000 (17:31 -0400)
The state was checked immediately after the send() call - which yields unpredictable results because of the inherent multithreading - and then does nothing more than log a message about it.  So, this winds up logging error messages at times when everything is perfectly fine, but doesn't recover from any sort of error.

navigator.gssweb.js

index 8aa498c..cd17389 100644 (file)
@@ -148,9 +148,6 @@ var GSSWeb = (function () {
     this.xhr.onreadystatechange = this.recvTokenFromServer.bind(this);
 
     this.xhr.send(msg);
-    if (this.xhr.readyStatus <= 2)
-        console.log("Error sending POST, readyStatus =" + this.xhr.readyStatus
-                  + ", msg = '" + msg + "'");
   };
 
   GSSWeb.prototype.recvTokenFromServer = function () {