Just strip out " from cluster response because Spidermonkey JSON.parse does not allow literals.

This commit is contained in:
Edward Lee 2009-08-25 17:42:25 -07:00
Родитель 699cbc5769
Коммит 3fe9021f27
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -472,6 +472,8 @@ WeaveSvc.prototype = {
this._log.debug("Using serverURL as data cluster (multi-cluster support disabled)");
return Svc.Prefs.get("serverURL");
case 200:
// The server gives JSON of a string literal, but JS doesn't allow it
res.data = res.data.replace(/"/g, "");
return "https://" + res.data + "/";
default:
this._log.debug("Unexpected response code trying to find cluster: " + res.lastChannel.responseStatus);