RESOLVED FIXED 83925
REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache are cached
https://bugs.webkit.org/show_bug.cgi?id=83925
Summary REGRESSION (XHR Caching): Uncacheable responses sent by Rails through Apache ...
Alexey Proskuryakov
Reported 2012-04-13 11:46:14 PDT
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? <rdar://problem/11231790>
Attachments
proposed fix (4.16 KB, patch)
2012-04-13 13:54 PDT, Alexey Proskuryakov
koivisto: review+
Nate Chapin
Comment 1 2012-04-13 11:51:58 PDT
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.
Alexey Proskuryakov
Comment 2 2012-04-13 13:36:51 PDT
Actually, this might be as easy as adjusting precedence in ResourceResponseBase::parseCacheControlDirectives(). I'll take a look.
Alexey Proskuryakov
Comment 3 2012-04-13 13:54:32 PDT
Created attachment 137141 [details] proposed fix
Antti Koivisto
Comment 4 2012-04-13 13:55:56 PDT
Comment on attachment 137141 [details] proposed fix r=me
Alexey Proskuryakov
Comment 5 2012-04-13 13:58:09 PDT
Note You need to log in before you can comment on or make changes to this bug.