fixes bug 83471 "Redirection loops"

r=bbaetz@cs.mcgill.ca
sr=rpotts@netscape.com


git-svn-id: svn://10.0.0.236/trunk@110048 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2001-12-08 00:23:04 +00:00
parent 80126d7f1e
commit a9d56fd85d
9 changed files with 104 additions and 27 deletions

View File

@@ -1218,6 +1218,26 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
}
}
}
//
// Doc failed to load because the server generated too many redirects
//
else if (aStatus == NS_ERROR_REDIRECT_LOOP) {
nsCOMPtr<nsIPrompt> prompter;
nsCOMPtr<nsIStringBundle> stringBundle;
rv = GetPromptAndStringBundle(getter_AddRefs(prompter),
getter_AddRefs(stringBundle));
if (!stringBundle) {
return rv;
}
nsXPIDLString messageStr;
rv = stringBundle->GetStringFromName(NS_LITERAL_STRING("redirectLoop").get(),
getter_Copies(messageStr));
if (NS_FAILED(rv)) return rv;
prompter->Alert(nsnull, messageStr);
}
} // if we have a host
return NS_OK;