aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/cache.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that cache-control headers are mergedJames Tucker2012-06-181-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | There are several aspects to this commit, that don't well fit into broken down commits, so they are detailed here: * When a user uses response.headers['Cache-Control'] = some_value, then the documented convention in ConditionalGet is not adhered to, in this case, response.cache_control is ignored due to `return if self[CACHE_CONTROL].present?` * When a middleware sets cache-control headers that would clobber, they're converted to symbols directly, without underscores. This would lead to bugs. * Items that would live in :extras if set through expires_in, are placed directly in the @cache_control hash, and not respected in many cases (somewhat adhering to the aforementioned documentation). * Although quite useless, any directive named 'extras' would be ignored. The general convention applied is that expires_* take precedence, but no longer overwrite everything and expires_* are ALWAYS applied, even if the header is set. I am still unhappy about the contents of this commit, and the code in general. Ideally it should be refactored to no longer use :extras. I'd likely recommend expanding @cache_control into a class, and giving it the power to handle the merge in a more efficient fashion. Such a commit would be a larger change that could have additional semantic changes for other libraries unless they utilize expires_in in very standard ways.
* Merge pull request #3479 from arvida/ensure-date-header-on-expires-inJosé Valim2012-02-181-0/+14
|\ | | | | Ensure Date header on expires_in
| * Added accessor methods for Date headerarvida2011-10-311-0/+14
| |
* | Use freezed string constant. Some string literals is used repeatedly.kennyj2011-12-081-15/+27
|/
* Fix previous commit by allowing a proc to be given as response_body. This is ↵José Valim2011-05-101-14/+12
| | | | deprecated and is going to be removed in future releases.
* removing more unused variablesAaron Patterson2011-01-171-1/+1
|
* Change def to attr_reader + aliasKrekoten' Marjan2010-10-181-10/+3
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move ETag and ConditionalGet logic from AD::Response to the middleware stack.José Valim2010-10-031-21/+1
|
* no need to assign if we are gonna returnXavier Noria2010-08-121-2/+2
|
* ETag: use body instead of @body since the method will always return a stringJeremy Kemper2010-06-281-2/+2
|
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+2
|
* Fix a bunch of pending tests by providing an introspection mode for the ↵Carlhuda2010-02-191-3/+18
| | | | Response object that does up-front parsing of the headers to populate things like @etag
* Split ActionDispatch http in smaller chunks.José Valim2010-01-161-0/+123