From 7ae7d77cc078168a0618f960340dbb7a98f8ec47 Mon Sep 17 00:00:00 2001 From: Curtis Bartley Date: Thu, 5 Feb 2009 17:38:17 -0500 Subject: [PATCH] Bug 475542 - history/cache problem with view page source issuing a GET on an already POSTed form. r=gavin --- toolkit/components/viewsource/content/viewSource.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toolkit/components/viewsource/content/viewSource.js b/toolkit/components/viewsource/content/viewSource.js index 49f320de36bd..5a9604039f91 100644 --- a/toolkit/components/viewsource/content/viewSource.js +++ b/toolkit/components/viewsource/content/viewSource.js @@ -232,10 +232,12 @@ function viewSource(url) loadFromURL = false; // Record the page load in the session history so will work. + var shEntrySource = arg.QueryInterface(Ci.nsISHEntry); var shEntry = Cc["@mozilla.org/browser/session-history-entry;1"].createInstance(Ci.nsISHEntry); shEntry.setURI(makeURI(viewSrcUrl, null, null)); shEntry.setTitle(viewSrcUrl); shEntry.loadType = Ci.nsIDocShellLoadInfo.loadHistory; + shEntry.cacheKey = shEntrySource.cacheKey; getBrowser().webNavigation.sessionHistory .QueryInterface(Ci.nsISHistoryInternal) .addEntry(shEntry, true);