Bug 94514 - POST result page should not appear in global history or history autocomplete results. r=bz, sr=bz
git-svn-id: svn://10.0.0.236/trunk@245011 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -8612,6 +8612,16 @@ nsDocShell::AddToGlobalHistory(nsIURI * aURI, PRBool aRedirect,
|
||||
if (mItemType != typeContent || !mGlobalHistory)
|
||||
return NS_OK;
|
||||
|
||||
// If this is a POST request, we do not want to include this in global
|
||||
// history, so return early.
|
||||
nsCOMPtr<nsIHttpChannel> hchan(do_QueryInterface(aChannel));
|
||||
if (hchan) {
|
||||
nsCAutoString type;
|
||||
nsresult rv = hchan->GetRequestMethod(type);
|
||||
if (NS_SUCCEEDED(rv) && type.EqualsLiteral("POST"))
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool visited;
|
||||
nsresult rv = mGlobalHistory->IsVisited(aURI, &visited);
|
||||
if (NS_FAILED(rv))
|
||||
|
||||
Reference in New Issue
Block a user