зеркало из https://github.com/mozilla/pjs.git
fix downloading of truncated pop3 messages when user has changed the server user name, 222896, r/sr=mscott
This commit is contained in:
Родитель
deaed0fe6f
Коммит
b9cbebd6ca
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче