зеркало из https://github.com/mozilla/pjs.git
Bug 348360: jar:file: urls should not trigger a lookup
patch: check inner uri r=bryner
This commit is contained in:
Родитель
ebbf63598a
Коммит
193155108b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче