Open Bug 2060912 Opened 10 days ago Updated 9 days ago

view-source re-requests rather than using the cached source

Categories

(Core :: DOM: Navigation, defect)

defect

Tracking

()

Tracking Status
firefox-esr115 --- wontfix
firefox-esr140 --- wontfix
firefox-esr153 --- wontfix
firefox153 --- wontfix
firefox154 --- wontfix
firefox155 --- fix-optional

People

(Reporter: vhilla, Unassigned)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file server.py

Using the context menu to view page source re-requests the source rather than showing a cached version. If the request isn't idempotent, we might show different source than what is rendered.

See bug 55583, seems like this has been a bug previously. It does work in Chrome.

Claude says this was regressed by bug 1655572.

Cause according to Claude: nsDocShell::LoadPageAsViewSource fetches the viewed document's cache key and passes it to InternalLoad, but every SetCacheKey call in DoURILoad is gated on the load type (nsDocShell.cpp:9262-9288, requiring LOAD_HISTORY or LOAD_RELOAD_*), and the view-source load state defaults to LOAD_NORMAL. The cache key is the HTTP post id (nsHttpChannel::SetCacheKey → mPostID, nsHttpChannel.cpp:11311, appended to the cache entry id at :5118), so without it the channel generates a fresh post id, misses the cache, and goes to the network.

Severity: -- → S3
Keywords: regression
Regressed by: 1655572
See Also: → 55583

Set release status flags based on info from the regressing bug 1655572

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: