Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background: Some webservers (thin and passenger for example) don't add a HTTP Date header to the response. This is not a problem for modern browsers but it can cause problems with other HTTP clients, for example Amazon's CloudFront expects a Date header when it gets a Cache-Control max-age value and .Net's HttpWebRequest's have some similar issue.
From what I understand the HTTP spec says that the client should use the Date header when calculating how a long a cached response is valid.
I can see that the Date header might not be Rails responsibility, but I think it would be good if
#expires_in
ensures that the client can use Cache-Control's max-age value by setting a Date header in the response. What you think about this?