Don't do URI fixup on IP address literals. Bug 62402, patch by Lorenzo Colitti

<lorenzo@colitti.com>, r=adamlock, sr=darin
This commit is contained in:
bzbarsky%mit.edu 2004-01-28 19:56:55 +00:00
Родитель 43bfbc887e
Коммит d3c174d282
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -121,6 +121,9 @@
#include "nsIExternalProtocolService.h"
#include "nsCExternalHandlerService.h"
// Used in the fixup code
#include "prnetdb.h"
#ifdef NS_DEBUG
/**
* Note: the log module is created during initialization which
@ -860,6 +863,12 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress,
keywordsEnabled = PR_FALSE;
}
// Don't perform fixup on an IP address
PRNetAddr addr;
if(PR_StringToNetAddr(host.get(), &addr) == PR_SUCCESS) {
keywordsEnabled = PR_FALSE;
}
if(keywordsEnabled && (-1 == dotLoc)) {
// only send non-qualified hosts to the keyword server
nsCAutoString keywordSpec("keyword:");