Closed Bug 748108 Opened 13 years ago Closed 10 years ago

Incorrectly caching redirects that lack an Expires header.

Categories

(Core :: Networking: Cache, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jduell.mcbugs, Unassigned)

Details

Attachments

(1 file)

Attached file nc script
Noticed this while debugging. We're storing 3xx requests with a cache entry expiration time of 0 (unix epoch). Then when we hit the same URI, we load the entry, notice it's old, and wind up hitting the server anyway. This wastes time (useless I/O) and space. I suspect there's both an HTTP and cache solution to this. HTTP shouldn't write a cache entry with expires=0 time on it (we should be writing "no expiration" IIUC). And the cache should probably be changed to automatically doom any entry that has an expired cache time of 0. Steps to reproduce. Run nc -k -l 8080 <vanilla_redirect_ppl hit "localhost:8080/foo" once. Open about:cache and you'll see entry with expires=0. Hit it again and you'll see that the nc server gets hit again. If you change the nc file to contain Expires: Thu, 19 Nov 2014 08:52:00 GMT Then we store the entry with that date, and we don't wind up asking the server for the redirect when we hit it again.
we store just about everything for offline, etc..
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: