When using Rails with Apache, it's common to have two max-age directives (one is added by Rails, another by mod_expires):
max-age=0, private, must-revalidate, max-age=60
We appear to honor the last directive instead of the first,like other browsers do.
Steps to reproduce:
1. Terminal: sudo gem install sinatra
2. Download and unzip the attached archive.
3. In Terminal, cd to the archive's directory and run 'ruby app.rb'
4. In Safari, open a new window and navigate to http://localhost:4567
5. Click the button on the page and observe the output from the ruby command above.
I confirmed that this test started to fail in r107672, although the root cause is really a pre-existing issue with memory cache (the same is reproducible with script elements).
Nate, is this something you'd be willing to look into?
I'd be happy to. Fair warning though, I don't know all that much about the part of the cache that actually handles caching headers, so I may be slow to figure it out.
Actually, this might be as easy as adjusting precedence in ResourceResponseBase::parseCacheControlDirectives(). I'll take a look.
Created attachment 137141 [details]
Comment on attachment 137141 [details]