return http status code from dav's checkLogin

This commit is contained in:
Dan Mills 2008-06-26 12:22:19 -07:00
Родитель c3a7096c74
Коммит 76c7dbd4f1
1 изменённых файлов: 1 добавлений и 8 удалений

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

@ -319,14 +319,7 @@ DAVCollection.prototype = {
let resp = yield; let resp = yield;
this._log.debug("checkLogin got response status " + resp.status); this._log.debug("checkLogin got response status " + resp.status);
// XXX would be nice if 404 == invalid username, 401 == invalid password. self.done(resp.status);
let retmsg = "";
if (resp.status == 401)
retmsg = "invalid username or password";
else if (resp.status < 200 || resp.status >= 300)
retmsg = "server error";
self.done(retmsg);
}, },
// Locking // Locking