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

<lorenzo@colitti.com>, r=adamlock, sr=darin


git-svn-id: svn://10.0.0.236/trunk@151968 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2004-01-28 19:56:55 +00:00
parent 6daebb95b1
commit 4d0cf5fe48

View File

@@ -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:");