소스 검색

HUE-128. Error 12030 or 12031 on logout attempt in IE

Marcus McLaughlin 16 년 전
부모
커밋
d77e0fd463
1개의 변경된 파일7개의 추가작업 그리고 2개의 파일을 삭제
  1. 7 2
      desktop/core/static/js/Source/CCS/CCS.Request.js

+ 7 - 2
desktop/core/static/js/Source/CCS/CCS.Request.js

@@ -40,9 +40,14 @@ script: CCS.Request.js
 				this.genericErrorAlert(data);
 			},
 			onFailure: function() {
-				var msg;
+                                var msg;
 				if(this.status == 0) msg = "The Hue server can not be reached. (Is the server running ?)";
-				else msg = "Error " + this.status + " retrieving <a target='_blank' href='" + this.options.url + "'>link</a>";
+                                //In IE, the attempt to get the profile upon logout often results in a status error 12030 or 12031.  The request completes successfully, just that IE is unhappy with the response.  This condition catches that condition and passes it to handleLoginRequired(), which is what should happen.
+				else if (Browser.Engine.trident && this.status == 12030 || this.status == 12031) {
+                                        this.handleLoginRequired();
+                                        return;
+                                }
+                                else msg = "Error " + this.status + " retrieving <a target='_blank' href='" + this.options.url + "'>link</a>";
 				this.genericErrorAlert({ 
 					message: msg
 				});