зеркало из 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);
|
nsCOMPtr<nsIMsgMailNewsUrl> url = do_QueryInterface(aURI, &rv);
|
||||||
if (NS_SUCCEEDED(rv) && url)
|
if (NS_SUCCEEDED(rv) && url)
|
||||||
{
|
{
|
||||||
// GetUsername() returns an escaped username, and the protocol
|
nsXPIDLCString realUserName;
|
||||||
// stores the username unescaped, so we must unescape the username.
|
nsCOMPtr <nsIMsgIncomingServer> server;
|
||||||
// XXX this is of course very risky since the unescaped string may
|
url->GetServer(getter_AddRefs(server));
|
||||||
// contain embedded nulls as well as characters from some unknown
|
if (server)
|
||||||
// charset!!
|
{
|
||||||
url->GetUsername(username);
|
server->GetRealUsername(getter_Copies(realUserName));
|
||||||
NS_UnescapeURL(username);
|
protocol->SetUsername(realUserName.get());
|
||||||
protocol->SetUsername(username.get());
|
}
|
||||||
}
|
}
|
||||||
rv = protocol->QueryInterface(NS_GET_IID(nsIChannel), (void **) _retval);
|
rv = protocol->QueryInterface(NS_GET_IID(nsIChannel), (void **) _retval);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче