Bug 348360: jar:file: urls should not trigger a lookup

patch: check inner uri
r=bryner
This commit is contained in:
tony%ponderer.org 2006-08-11 18:51:20 +00:00
Родитель ebbf63598a
Коммит 193155108b
1 изменённых файлов: 14 добавлений и 0 удалений

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

@ -42,6 +42,7 @@
#include "nsITimer.h"
#include "nsIURI.h"
#include "nsIWebProgress.h"
#include "nsNetUtil.h"
#include "nsServiceManagerUtils.h"
#include "nsString.h"
@ -195,6 +196,19 @@ nsDocNavStartProgressListener::IsSpurious(nsIURI* aURI, PRBool* isSpurious)
scheme.Equals("chrome") ||
scheme.Equals("file");
if (scheme.Equals("jar")) {
// If it's a jar URI, we want to check the inner URI's scheme
nsCAutoString inner;
rv = aURI->GetPath(inner);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIURI> innerURI;
rv = NS_NewURI(getter_AddRefs(innerURI), inner);
NS_ENSURE_SUCCESS(rv, rv);
return IsSpurious(innerURI, isSpurious);
}
return NS_OK;
}