From 6e8aeea76d1999954e72edb822a07fb9ee24f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20Nie=C3=9Fen?= Date: Sun, 21 Jun 2015 20:46:09 +0200 Subject: [PATCH] set error to response if list is empty (avoid ChromeIPass hanging) (reverted from commit c736ba7059e35675d4ba54bb8a2c8f78d5790cd7) --- src/http/Server.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/http/Server.cpp b/src/http/Server.cpp index 727d98825..576d55bf5 100644 --- a/src/http/Server.cpp +++ b/src/http/Server.cpp @@ -75,19 +75,14 @@ void Server::getLogins(const Request &r, Response *protocolResp) if (!r.CheckVerifier(key)) return; + protocolResp->setSuccess(); protocolResp->setId(r.id()); protocolResp->setVerifier(key); QList entries = findMatchingEntries(r.id(), r.url(), r.submitUrl(), r.realm()); //TODO: filtering, request confirmation [in db adaptation layer?] - if (entries.count() == 0) { - protocolResp->setError("url not found!"); - } - else { - if (r.sortSelection()) { - //TODO: sorting (in db adaptation layer? here?) - } - protocolResp->setSuccess(); - protocolResp->setEntries(entries); + if (r.sortSelection()) { + //TODO: sorting (in db adaptation layer? here?) } + protocolResp->setEntries(entries); } void Server::getLoginsCount(const Request &r, Response *protocolResp)