fixes bug 252023 ""no-store" header directives from server or web script ignored by browser during non-SSL transactions" r+sr=bzbarsky a=asa
git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@162772 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -35,6 +35,7 @@ nsSHEntry::nsSHEntry()
|
||||
{
|
||||
mParent = nsnull;
|
||||
mID = gEntryID++;
|
||||
mSaveLayoutState = PR_TRUE;
|
||||
}
|
||||
|
||||
nsSHEntry::~nsSHEntry()
|
||||
@@ -168,6 +169,7 @@ NS_IMETHODIMP nsSHEntry::GetLayoutHistoryState(nsILayoutHistoryState** aResult)
|
||||
|
||||
NS_IMETHODIMP nsSHEntry::SetLayoutHistoryState(nsILayoutHistoryState* aState)
|
||||
{
|
||||
NS_ENSURE_STATE(mSaveLayoutState || !aState);
|
||||
mLayoutHistoryState = aState;
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -240,6 +242,12 @@ NS_IMETHODIMP nsSHEntry::GetSaveLayoutStateFlag(PRBool * aFlag)
|
||||
NS_IMETHODIMP nsSHEntry::SetSaveLayoutStateFlag(PRBool aFlag)
|
||||
{
|
||||
mSaveLayoutState = aFlag;
|
||||
|
||||
// if we are not allowed to hold layout history state, then make sure
|
||||
// that we are not holding it!
|
||||
if (!mSaveLayoutState)
|
||||
mLayoutHistoryState = nsnull;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -280,7 +288,6 @@ nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle,
|
||||
SetTitle(aTitle);
|
||||
SetDocument(aDOMDocument);
|
||||
SetPostData(aInputStream);
|
||||
SetLayoutHistoryState(aHistoryLayoutState);
|
||||
SetCacheKey(aCacheKey);
|
||||
SetContentType(aContentType);
|
||||
|
||||
@@ -294,6 +301,7 @@ nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle,
|
||||
|
||||
// By default we save HistoryLayoutState
|
||||
SetSaveLayoutStateFlag(PR_TRUE);
|
||||
SetLayoutHistoryState(aHistoryLayoutState);
|
||||
|
||||
//By default the page is not expired
|
||||
SetExpirationStatus(PR_FALSE);
|
||||
@@ -317,13 +325,13 @@ nsSHEntry::Clone(nsISHEntry ** aResult)
|
||||
dest->SetURI(mURI);
|
||||
dest->SetReferrerURI(mReferrerURI);
|
||||
dest->SetPostData(mPostData);
|
||||
dest->SetSaveLayoutStateFlag(mSaveLayoutState);
|
||||
dest->SetLayoutHistoryState(mLayoutHistoryState);
|
||||
dest->SetTitle(mTitle.get());
|
||||
dest->SetParent(mParent);
|
||||
dest->SetID(mID);
|
||||
dest->SetIsSubFrame(mIsFrameNavigation);
|
||||
dest->SetExpirationStatus(mExpired);
|
||||
dest->SetSaveLayoutStateFlag(mSaveLayoutState);
|
||||
dest->SetCacheKey(mCacheKey);
|
||||
|
||||
rv = dest->QueryInterface(NS_GET_IID(nsISHEntry), (void**) aResult);
|
||||
|
||||
Reference in New Issue
Block a user