Bug 320851: http authentication (401) prompt no longer displays scheme, r+sr=darin

This commit is contained in:
gavin%gavinsharp.com 2006-01-10 17:59:49 +00:00
parent 40268c1df5
commit 41b4ad9c1a

View File

@ -2768,8 +2768,20 @@ nsHttpChannel::PromptForIdentity(const char *scheme,
{
NS_NAMED_LITERAL_STRING(proxyText, "EnterUserPasswordForProxy");
NS_NAMED_LITERAL_STRING(originText, "EnterUserPasswordForRealm");
const PRUnichar *text = proxyAuth ? proxyText.get() : originText.get();
const PRUnichar *text;
if (proxyAuth) {
text = proxyText.get();
} else {
text = originText.get();
// prepend "scheme://"
nsAutoString schemeU;
CopyASCIItoUTF16(scheme, schemeU);
schemeU.AppendLiteral("://");
displayHost.Insert(schemeU, 0);
}
const PRUnichar *strings[] = { realmU.get(), displayHost.get() };
rv = bundle->FormatStringFromName(text, strings, 2,