bug #102774 (r=jst@netscape.com, sr=vidur@netscape.com). location.reload(true) did not cause the cache to be bypassed.

This commit is contained in:
rpotts%netscape.com 2001-10-09 05:02:25 +00:00
parent 5950ddf5e7
commit e4def3f5bb

View File

@ -699,13 +699,23 @@ LocationImpl::SetSearch(const nsAReadableString& aSearch)
NS_IMETHODIMP
LocationImpl::Reload(PRBool aForceget)
{
nsresult rv;
nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(mDocShell));
NS_ENSURE_TRUE(webNav, NS_ERROR_FAILURE);
NS_ENSURE_SUCCESS(webNav->Reload(nsIWebNavigation::LOAD_FLAGS_NONE),
NS_ERROR_FAILURE);
if (webNav) {
PRUint32 reloadFlags = nsIWebNavigation::LOAD_FLAGS_NONE;
return NS_OK;
if (aForceget) {
reloadFlags = nsIWebNavigation::LOAD_FLAGS_BYPASS_CACHE |
nsIWebNavigation::LOAD_FLAGS_BYPASS_PROXY;
}
rv = webNav->Reload(reloadFlags);
} else {
NS_ASSERTION(0, "nsIWebNavigation interface is not available!");
rv = NS_ERROR_FAILURE;
}
return rv;
}
NS_IMETHODIMP