fix escaping of user name (r=alecf) also fix build bustage

This commit is contained in:
bienvenu%netscape.com 2000-02-05 01:19:38 +00:00
parent 9c7d859963
commit 4288f5ddc1
3 changed files with 10 additions and 3 deletions

View File

@ -605,7 +605,7 @@ nsMsgAccountManager::SetDefaultAccount(nsIMsgAccount * aDefaultAccount)
return NS_OK;
}
NS_IMETHODIMP
nsresult
nsMsgAccountManager::setDefaultAccountPref(nsIMsgAccount* aDefaultAccount)
{
nsresult rv;

View File

@ -172,7 +172,8 @@ nsMsgIncomingServer::GetServerURI(char **aResult)
if (NS_SUCCEEDED(rv) && ((const char*)username) && username[0]) {
nsXPIDLCString escapedUsername;
*((char **)getter_Copies(escapedUsername)) =
nsEscape(username, url_Path);
nsEscape(username, url_XAlphas);
// nsEscape(username, url_Path);
// not all servers have a username
uri += escapedUsername;
uri += '@';

View File

@ -140,8 +140,14 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe
nsXPIDLCString host;
nsXPIDLCString scheme;
nsXPIDLCString userName;
nsresult rv = GetHost(getter_Copies(host));
GetUsername(getter_Copies(userName));
if ((const char *) userName)
nsUnescape(NS_CONST_CAST(char*,(const char*)userName));
rv = GetScheme(getter_Copies(scheme));
if (NS_SUCCEEDED(rv))
{
@ -150,7 +156,7 @@ NS_IMETHODIMP nsMsgMailNewsUrl::GetServer(nsIMsgIncomingServer ** aIncomingServe
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIMsgIncomingServer> server;
rv = accountManager->FindServer(GetUserName(),
rv = accountManager->FindServer(userName,
host,
scheme,
aIncomingServer);