HER-2015 credentials cached to server never used

* FetchHTTP.java
    populateCredentials() - return true when credentials populated from server cache
This commit is contained in:
Noah Levitt
2012-07-16 20:02:56 -07:00
parent eee6c6cd30
commit 37a8504fda
@@ -1143,17 +1143,20 @@ public class FetchHTTP extends Processor implements Lifecycle {
} catch (URIException e) {
return false;
}
boolean result = false;
CrawlServer server = serverCache.getServerFor(serverKey);
if (server.hasCredentials()) {
for (Credential cred : server.getCredentials()) {
if (cred.isEveryTime()) {
cred.populate(curi, this.http, method);
if (cred.populate(curi, this.http, method)) {
result = true;
}
}
}
}
boolean result = false;
// Now look in the curi. The Curi will have credentials loaded either
// by the handle401 method if its a rfc2617 or it'll have been set into
// the curi by the preconditionenforcer as this login uri came through.