* CrawlURI whose credentials we are to promote.
*/
protected void promoteCredentials(final CrawlURI curi) {
Set<Credential> credentials = curi.getCredentials();
for (Iterator<Credential> i = credentials.iterator(); i.hasNext();) {
Credential c = i.next();
i.remove();
// The server to attach to may not be the server that hosts
// this passed curi. It might be of another subdomain.
// The avatar needs to be added to the server that is dependent
// on this precondition. Find it by name. Get the name from
// the credential this avatar represents.
String cd = c.getDomain();
if (cd != null) {
CrawlServer cs = serverCache.getServerFor(cd);
if (cs != null) {
cs.addCredential(c);
cs.setHttpAuthChallenges(curi.getHttpAuthChallenges());