LP#854760 messagecat fails with certain 404 pages
authorJason Etheridge <jason@esilibrary.com>
Tue, 20 Sep 2011 14:52:02 +0000 (10:52 -0400)
committerMike Rylander <mrylander@gmail.com>
Wed, 21 Sep 2011 13:15:54 +0000 (09:15 -0400)
We were failing to check the HTTP status on the underlying XHR requests.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/xul/staff_client/chrome/content/main/bindings.xml

index 6eae692..364184c 100644 (file)
                             var x = new XMLHttpRequest();
                             x.open("GET",this.src,false);
                             x.send(null);
-                            if (x.responseText) {
+                            if (x.status == 200 && x.responseText) {
                                 var props = this._props2object(x.responseText);
                                 for (var i in props) {
                                     this._props[i] = props[i];
                                 var x2 = new XMLHttpRequest();
                                 x2.open("GET",custom_src,false);
                                 x2.send(null);
-                                if (x2.responseText) {
+                                if (x2.status == 200 && x2.responseText) {
                                     var props = this._props2object(x2.responseText);
                                     for (var i in props) {
                                         this._props[i] = props[i];