fix downloading of truncated pop3 messages when user has changed the server user name, 222896, r/sr=mscott

This commit is contained in:
bienvenu%nventure.com 2003-11-12 23:10:18 +00:00
Родитель deaed0fe6f
Коммит b9cbebd6ca
1 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -374,14 +374,14 @@ NS_IMETHODIMP nsPop3Service::NewChannel(nsIURI *aURI, nsIChannel **_retval)
nsCOMPtr<nsIMsgMailNewsUrl> url = do_QueryInterface(aURI, &rv);
if (NS_SUCCEEDED(rv) && url)
{
// GetUsername() returns an escaped username, and the protocol
// stores the username unescaped, so we must unescape the username.
// XXX this is of course very risky since the unescaped string may
// contain embedded nulls as well as characters from some unknown
// charset!!
url->GetUsername(username);
NS_UnescapeURL(username);
protocol->SetUsername(username.get());
nsXPIDLCString realUserName;
nsCOMPtr <nsIMsgIncomingServer> server;
url->GetServer(getter_AddRefs(server));
if (server)
{
server->GetRealUsername(getter_Copies(realUserName));
protocol->SetUsername(realUserName.get());
}
}
rv = protocol->QueryInterface(NS_GET_IID(nsIChannel), (void **) _retval);
}