Skip to content

Conversation

bchelli
Copy link

@bchelli bchelli commented Sep 7, 2016

max-age and s-maxage serve the same purpose and work the same way. The order of priority is as follow:

  • First priority on s-maxage
  • Then on max-age
  • Then on expires

Here is the RFC regarding the s-maxage:
https://tools.ietf.org/html/rfc7234#section-5.2.2.9

max-age and s-maxage serve the same purpose and work the same way. The order of priority is as follow:
* First priority on s-maxage
* Then on max-age
* Then on expires

Here is the RFC regarding the s-maxage:
https://tools.ietf.org/html/rfc7234#section-5.2.2.9
@bchelli
Copy link
Author

bchelli commented Sep 14, 2016

@roryf what do you think? please advise.
Thanks

Copy link
Owner

@roryf roryf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine in principle, can you update tests accordingly?

.filter(function (key) { return header[key]; })
.forEach(function (key) {
try {
var maxAge = parseInt(header[key], 10);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but could this be renamed to something like headerValue? Given that this is now concerned with any value that should be numeric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants