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:
Родитель
520e38fc3d
Коммит
45461d1d38
|
@ -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:");
|
||||
|
|
Загрузка…
Ссылка в новой задаче