From 6f4414ed4d72662355f15a0f51e343941d34ec82 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 Oct 2008 19:01:32 +0000 Subject: [PATCH] More accurate error message on server error (instead of "Empty response from server") --- chrome/content/zotero/xpcom/sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 876f0bf0b2..2e7749fa87 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -1151,11 +1151,11 @@ Zotero.Sync.Server = new function () { function _checkResponse(xmlhttp) { - if (!xmlhttp.responseXML) { + if (!xmlhttp.responseText) { _error('Empty response from server'); } - if ( !xmlhttp.responseXML.childNodes[0] || + if (!xmlhttp.responseXML || !xmlhttp.responseXML.childNodes[0] || xmlhttp.responseXML.childNodes[0].tagName != 'response') { Zotero.debug(xmlhttp.responseText); _error('Invalid response from server', xmlhttp.responseText);